
// this is autogenerated file, do not edit it.
#include "ficus/ficus.h"

struct _fx_Nt6option1N10Ast__typ_t_data_t;

static void _fx_free_Nt6option1N10Ast__typ_t(struct _fx_Nt6option1N10Ast__typ_t_data_t** dst);

struct _fx_Nt6option1N10Ast__exp_t_data_t;

static void _fx_free_Nt6option1N10Ast__exp_t(struct _fx_Nt6option1N10Ast__exp_t_data_t** dst);

struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t;

static void _fx_free_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t** dst);

struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t;

static void _fx_free_Nt10Hashset__t1R9Ast__id_t(struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** dst);

struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t;

static void _fx_free_Nt9Dynvec__t1N14Ast__id_info_t(struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t** dst);

struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t;

static void _fx_free_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t** dst);

struct _fx_N10Ast__typ_t_data_t;

static void _fx_free_N10Ast__typ_t(struct _fx_N10Ast__typ_t_data_t** dst);

struct _fx_N13Ast__binary_t_data_t;

static void _fx_free_N13Ast__binary_t(struct _fx_N13Ast__binary_t_data_t** dst);

struct _fx_N10Ast__exp_t_data_t;

static void _fx_free_N10Ast__exp_t(struct _fx_N10Ast__exp_t_data_t** dst);

struct _fx_N10Ast__pat_t_data_t;

static void _fx_free_N10Ast__pat_t(struct _fx_N10Ast__pat_t_data_t** dst);

struct _fx_N16Ast__env_entry_t_data_t;

static void _fx_free_N16Ast__env_entry_t(struct _fx_N16Ast__env_entry_t_data_t** dst);

struct _fx_N16Ast__defmodule_t_data_t;

static void _fx_free_N16Ast__defmodule_t(struct _fx_N16Ast__defmodule_t_data_t** dst);

struct _fx_N14K_form__ktyp_t_data_t;

static void _fx_free_N14K_form__ktyp_t(struct _fx_N14K_form__ktyp_t_data_t** dst);

struct _fx_N14K_form__kexp_t_data_t;

static void _fx_free_N14K_form__kexp_t(struct _fx_N14K_form__kexp_t_data_t** dst);

struct _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t;

static void _fx_free_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t** dst);

struct _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t;

static void _fx_free_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t** dst);

typedef struct _fx_Nt6option1N10Ast__typ_t_data_t {
   int_ rc;
   union {
      struct _fx_N10Ast__typ_t_data_t* Some;
   } u;
} _fx_Nt6option1N10Ast__typ_t_data_t, *_fx_Nt6option1N10Ast__typ_t;

typedef struct _fx_LS_data_t {
   int_ rc;
   struct _fx_LS_data_t* tl;
   fx_str_t hd;
} _fx_LS_data_t, *_fx_LS;

typedef struct _fx_Ta2i {
   int_ t0;
   int_ t1;
} _fx_Ta2i;

typedef struct _fx_T2Ta2iS {
   struct _fx_Ta2i t0;
   fx_str_t t1;
} _fx_T2Ta2iS;

typedef struct _fx_R9Ast__id_t {
   int_ m;
   int_ i;
   int_ j;
} _fx_R9Ast__id_t;

typedef struct _fx_R10Ast__loc_t {
   int_ m_idx;
   int_ line0;
   int_ col0;
   int_ line1;
   int_ col1;
} _fx_R10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_ti {
   struct _fx_R9Ast__id_t t0;
   int_ t1;
} _fx_T2R9Ast__id_ti;

typedef struct _fx_T2Bi {
   bool t0;
   int_ t1;
} _fx_T2Bi;

typedef struct _fx_N12Ast__scope_t {
   int tag;
   union {
      int_ ScBlock;
      struct _fx_T2Bi ScLoop;
      int_ ScFold;
      int_ ScArrMap;
      int_ ScMap;
      int_ ScTry;
      struct _fx_R9Ast__id_t ScFun;
      struct _fx_R9Ast__id_t ScClass;
      struct _fx_R9Ast__id_t ScInterface;
      int_ ScModule;
   } u;
} _fx_N12Ast__scope_t;

typedef struct _fx_LN12Ast__scope_t_data_t {
   int_ rc;
   struct _fx_LN12Ast__scope_t_data_t* tl;
   struct _fx_N12Ast__scope_t hd;
} _fx_LN12Ast__scope_t_data_t, *_fx_LN12Ast__scope_t;

typedef struct _fx_R16Ast__val_flags_t {
   bool val_flag_arg;
   bool val_flag_mutable;
   bool val_flag_temp;
   bool val_flag_tempref;
   bool val_flag_private;
   bool val_flag_subarray;
   bool val_flag_instance;
   struct _fx_T2R9Ast__id_ti val_flag_method;
   int_ val_flag_ctor;
   struct _fx_LN12Ast__scope_t_data_t* val_flag_global;
} _fx_R16Ast__val_flags_t;

typedef struct _fx_N17Ast__fun_constr_t {
   int tag;
   union {
      int_ CtorVariant;
      struct _fx_R9Ast__id_t CtorFP;
      struct _fx_R9Ast__id_t CtorExn;
   } u;
} _fx_N17Ast__fun_constr_t;

typedef struct _fx_R16Ast__fun_flags_t {
   int_ fun_flag_pure;
   bool fun_flag_ccode;
   bool fun_flag_have_keywords;
   bool fun_flag_inline;
   bool fun_flag_nothrow;
   bool fun_flag_really_nothrow;
   bool fun_flag_private;
   struct _fx_N17Ast__fun_constr_t fun_flag_ctor;
   struct _fx_R9Ast__id_t fun_flag_method_of;
   bool fun_flag_uses_fv;
   bool fun_flag_recursive;
   bool fun_flag_instance;
} _fx_R16Ast__fun_flags_t;

typedef struct _fx_Ta2R9Ast__id_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_R9Ast__id_t t1;
} _fx_Ta2R9Ast__id_t;

typedef struct _fx_LR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LR9Ast__id_t_data_t* tl;
   struct _fx_R9Ast__id_t hd;
} _fx_LR9Ast__id_t_data_t, *_fx_LR9Ast__id_t;

typedef struct _fx_R17K_form__kdefval_t {
   struct _fx_R9Ast__id_t kv_name;
   fx_str_t kv_cname;
   struct _fx_N14K_form__ktyp_t_data_t* kv_typ;
   struct _fx_R16Ast__val_flags_t kv_flags;
   struct _fx_R10Ast__loc_t kv_loc;
} _fx_R17K_form__kdefval_t;

typedef struct _fx_T2R9Ast__id_tN14K_form__ktyp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14K_form__ktyp_t_data_t* t1;
} _fx_T2R9Ast__id_tN14K_form__ktyp_t;

typedef struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t hd;
} _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t, *_fx_LT2R9Ast__id_tN14K_form__ktyp_t;

typedef struct _fx_R23K_form__kdefinterface_t {
   struct _fx_R9Ast__id_t ki_name;
   struct _fx_R9Ast__id_t ki_base;
   fx_str_t ki_cname;
   struct _fx_R9Ast__id_t ki_id;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* ki_all_methods;
   struct _fx_LN12Ast__scope_t_data_t* ki_scope;
   struct _fx_R10Ast__loc_t ki_loc;
} _fx_R23K_form__kdefinterface_t;

typedef struct _fx_rR23K_form__kdefinterface_t_data_t {
   int_ rc;
   struct _fx_R23K_form__kdefinterface_t data;
} _fx_rR23K_form__kdefinterface_t_data_t, *_fx_rR23K_form__kdefinterface_t;

typedef struct _fx_R25K_form__kdefclosureinfo_t {
   struct _fx_R9Ast__id_t kci_arg;
   struct _fx_R9Ast__id_t kci_fcv_t;
   struct _fx_R9Ast__id_t kci_fp_typ;
   struct _fx_R9Ast__id_t kci_make_fp;
   struct _fx_R9Ast__id_t kci_wrap_f;
} _fx_R25K_form__kdefclosureinfo_t;

typedef struct _fx_R17K_form__kdeffun_t {
   struct _fx_R9Ast__id_t kf_name;
   fx_str_t kf_cname;
   struct _fx_LR9Ast__id_t_data_t* kf_params;
   struct _fx_N14K_form__ktyp_t_data_t* kf_rt;
   struct _fx_N14K_form__kexp_t_data_t* kf_body;
   struct _fx_R16Ast__fun_flags_t kf_flags;
   struct _fx_R25K_form__kdefclosureinfo_t kf_closure;
   struct _fx_LN12Ast__scope_t_data_t* kf_scope;
   struct _fx_R10Ast__loc_t kf_loc;
} _fx_R17K_form__kdeffun_t;

typedef struct _fx_rR17K_form__kdeffun_t_data_t {
   int_ rc;
   struct _fx_R17K_form__kdeffun_t data;
} _fx_rR17K_form__kdeffun_t_data_t, *_fx_rR17K_form__kdeffun_t;

typedef struct _fx_R17K_form__kdefexn_t {
   struct _fx_R9Ast__id_t ke_name;
   fx_str_t ke_cname;
   fx_str_t ke_base_cname;
   struct _fx_N14K_form__ktyp_t_data_t* ke_typ;
   bool ke_std;
   struct _fx_R9Ast__id_t ke_tag;
   struct _fx_R9Ast__id_t ke_make;
   struct _fx_LN12Ast__scope_t_data_t* ke_scope;
   struct _fx_R10Ast__loc_t ke_loc;
} _fx_R17K_form__kdefexn_t;

typedef struct _fx_rR17K_form__kdefexn_t_data_t {
   int_ rc;
   struct _fx_R17K_form__kdefexn_t data;
} _fx_rR17K_form__kdefexn_t_data_t, *_fx_rR17K_form__kdefexn_t;

typedef struct _fx_R17K_form__ktprops_t {
   bool ktp_complex;
   bool ktp_scalar;
   bool ktp_ptr;
   bool ktp_pass_by_ref;
   bool ktp_custom_free;
   bool ktp_custom_copy;
} _fx_R17K_form__ktprops_t;

typedef struct _fx_Nt6option1R17K_form__ktprops_t {
   int tag;
   union {
      struct _fx_R17K_form__ktprops_t Some;
   } u;
} _fx_Nt6option1R17K_form__ktprops_t;

typedef struct _fx_R16Ast__var_flags_t {
   int_ var_flag_class_from;
   bool var_flag_record;
   bool var_flag_recursive;
   bool var_flag_have_tag;
   bool var_flag_have_mutable;
   bool var_flag_opt;
   bool var_flag_instance;
} _fx_R16Ast__var_flags_t;

typedef struct _fx_LN14K_form__ktyp_t_data_t {
   int_ rc;
   struct _fx_LN14K_form__ktyp_t_data_t* tl;
   struct _fx_N14K_form__ktyp_t_data_t* hd;
} _fx_LN14K_form__ktyp_t_data_t, *_fx_LN14K_form__ktyp_t;

typedef struct _fx_T2R9Ast__id_tLR9Ast__id_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LR9Ast__id_t_data_t* t1;
} _fx_T2R9Ast__id_tLR9Ast__id_t;

typedef struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t* tl;
   struct _fx_T2R9Ast__id_tLR9Ast__id_t hd;
} _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t, *_fx_LT2R9Ast__id_tLR9Ast__id_t;

typedef struct _fx_R21K_form__kdefvariant_t {
   struct _fx_R9Ast__id_t kvar_name;
   fx_str_t kvar_cname;
   struct _fx_R9Ast__id_t kvar_proto;
   struct _fx_Nt6option1R17K_form__ktprops_t kvar_props;
   struct _fx_LN14K_form__ktyp_t_data_t* kvar_targs;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* kvar_cases;
   struct _fx_LR9Ast__id_t_data_t* kvar_ctors;
   struct _fx_R16Ast__var_flags_t kvar_flags;
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t* kvar_ifaces;
   struct _fx_LN12Ast__scope_t_data_t* kvar_scope;
   struct _fx_R10Ast__loc_t kvar_loc;
} _fx_R21K_form__kdefvariant_t;

typedef struct _fx_rR21K_form__kdefvariant_t_data_t {
   int_ rc;
   struct _fx_R21K_form__kdefvariant_t data;
} _fx_rR21K_form__kdefvariant_t_data_t, *_fx_rR21K_form__kdefvariant_t;

typedef struct _fx_R17K_form__kdeftyp_t {
   struct _fx_R9Ast__id_t kt_name;
   fx_str_t kt_cname;
   struct _fx_R9Ast__id_t kt_proto;
   struct _fx_Nt6option1R17K_form__ktprops_t kt_props;
   struct _fx_LN14K_form__ktyp_t_data_t* kt_targs;
   struct _fx_N14K_form__ktyp_t_data_t* kt_typ;
   struct _fx_LN12Ast__scope_t_data_t* kt_scope;
   struct _fx_R10Ast__loc_t kt_loc;
} _fx_R17K_form__kdeftyp_t;

typedef struct _fx_rR17K_form__kdeftyp_t_data_t {
   int_ rc;
   struct _fx_R17K_form__kdeftyp_t data;
} _fx_rR17K_form__kdeftyp_t_data_t, *_fx_rR17K_form__kdeftyp_t;

typedef struct _fx_R25K_form__kdefclosurevars_t {
   struct _fx_R9Ast__id_t kcv_name;
   fx_str_t kcv_cname;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* kcv_freevars;
   struct _fx_LR9Ast__id_t_data_t* kcv_orig_freevars;
   struct _fx_LN12Ast__scope_t_data_t* kcv_scope;
   struct _fx_R10Ast__loc_t kcv_loc;
} _fx_R25K_form__kdefclosurevars_t;

typedef struct _fx_rR25K_form__kdefclosurevars_t_data_t {
   int_ rc;
   struct _fx_R25K_form__kdefclosurevars_t data;
} _fx_rR25K_form__kdefclosurevars_t_data_t, *_fx_rR25K_form__kdefclosurevars_t;

typedef struct _fx_N15K_form__kinfo_t {
   int tag;
   union {
      struct _fx_R17K_form__kdefval_t KVal;
      struct _fx_rR17K_form__kdeffun_t_data_t* KFun;
      struct _fx_rR17K_form__kdefexn_t_data_t* KExn;
      struct _fx_rR21K_form__kdefvariant_t_data_t* KVariant;
      struct _fx_rR25K_form__kdefclosurevars_t_data_t* KClosureVars;
      struct _fx_rR23K_form__kdefinterface_t_data_t* KInterface;
      struct _fx_rR17K_form__kdeftyp_t_data_t* KTyp;
   } u;
} _fx_N15K_form__kinfo_t;

typedef struct _fx_Nt6option1R9Ast__id_t {
   int tag;
   union {
      struct _fx_R9Ast__id_t Some;
   } u;
} _fx_Nt6option1R9Ast__id_t;

typedef struct _fx_Nt6option1N10Ast__exp_t_data_t {
   int_ rc;
   union {
      struct _fx_N10Ast__exp_t_data_t* Some;
   } u;
} _fx_Nt6option1N10Ast__exp_t_data_t, *_fx_Nt6option1N10Ast__exp_t;

typedef struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t {
   uint64_t hv;
   struct _fx_R9Ast__id_t key;
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* data;
} _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t;

typedef struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t {
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t t0;
   int_ t1;
   int_ t2;
   int_ t3;
   fx_arr_t t4;
   fx_arr_t t5;
} _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t;

typedef struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t {
   int_ rc;
   union {
      struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t
         t;
   } u;
} _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t, *_fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t;

typedef struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t {
   uint64_t hv;
   struct _fx_R9Ast__id_t key;
} _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t;

typedef struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t {
   struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t t0;
   int_ t1;
   int_ t2;
   int_ t3;
   fx_arr_t t4;
   fx_arr_t t5;
} _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t;

typedef struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t {
   int_ rc;
   union {
      struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t t;
   } u;
} _fx_Nt10Hashset__t1R9Ast__id_t_data_t, *_fx_Nt10Hashset__t1R9Ast__id_t;

typedef struct _fx_R13Ast__defval_t {
   struct _fx_R9Ast__id_t dv_name;
   struct _fx_N10Ast__typ_t_data_t* dv_typ;
   struct _fx_R16Ast__val_flags_t dv_flags;
   struct _fx_LN12Ast__scope_t_data_t* dv_scope;
   struct _fx_R10Ast__loc_t dv_loc;
} _fx_R13Ast__defval_t;

typedef struct _fx_FPi2R9Ast__id_tR9Ast__id_t {
   int (*fp)(struct _fx_R9Ast__id_t*, struct _fx_R9Ast__id_t*, int_*, void*);
   fx_fcv_t* fcv;
} _fx_FPi2R9Ast__id_tR9Ast__id_t;

typedef struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t {
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t* root;
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t cmp;
} _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t;

typedef struct _fx_LN10Ast__pat_t_data_t {
   int_ rc;
   struct _fx_LN10Ast__pat_t_data_t* tl;
   struct _fx_N10Ast__pat_t_data_t* hd;
} _fx_LN10Ast__pat_t_data_t, *_fx_LN10Ast__pat_t;

typedef struct _fx_rLR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LR9Ast__id_t_data_t* data;
} _fx_rLR9Ast__id_t_data_t, *_fx_rLR9Ast__id_t;

typedef struct _fx_R13Ast__deffun_t {
   struct _fx_R9Ast__id_t df_name;
   struct _fx_LR9Ast__id_t_data_t* df_templ_args;
   struct _fx_LN10Ast__pat_t_data_t* df_args;
   struct _fx_N10Ast__typ_t_data_t* df_typ;
   struct _fx_N10Ast__exp_t_data_t* df_body;
   struct _fx_R16Ast__fun_flags_t df_flags;
   struct _fx_LN12Ast__scope_t_data_t* df_scope;
   struct _fx_R10Ast__loc_t df_loc;
   struct _fx_rLR9Ast__id_t_data_t* df_templ_inst;
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t df_env;
} _fx_R13Ast__deffun_t;

typedef struct _fx_rR13Ast__deffun_t_data_t {
   int_ rc;
   struct _fx_R13Ast__deffun_t data;
} _fx_rR13Ast__deffun_t_data_t, *_fx_rR13Ast__deffun_t;

typedef struct _fx_R13Ast__defexn_t {
   struct _fx_R9Ast__id_t dexn_name;
   struct _fx_N10Ast__typ_t_data_t* dexn_typ;
   struct _fx_LN12Ast__scope_t_data_t* dexn_scope;
   struct _fx_R10Ast__loc_t dexn_loc;
} _fx_R13Ast__defexn_t;

typedef struct _fx_rR13Ast__defexn_t_data_t {
   int_ rc;
   struct _fx_R13Ast__defexn_t data;
} _fx_rR13Ast__defexn_t_data_t, *_fx_rR13Ast__defexn_t;

typedef struct _fx_R13Ast__deftyp_t {
   struct _fx_R9Ast__id_t dt_name;
   struct _fx_LR9Ast__id_t_data_t* dt_templ_args;
   struct _fx_N10Ast__typ_t_data_t* dt_typ;
   bool dt_finalized;
   struct _fx_LN12Ast__scope_t_data_t* dt_scope;
   struct _fx_R10Ast__loc_t dt_loc;
} _fx_R13Ast__deftyp_t;

typedef struct _fx_rR13Ast__deftyp_t_data_t {
   int_ rc;
   struct _fx_R13Ast__deftyp_t data;
} _fx_rR13Ast__deftyp_t_data_t, *_fx_rR13Ast__deftyp_t;

typedef struct _fx_T2R9Ast__id_tN10Ast__typ_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
} _fx_T2R9Ast__id_tN10Ast__typ_t;

typedef struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN10Ast__typ_t hd;
} _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t, *_fx_LT2R9Ast__id_tN10Ast__typ_t;

typedef struct _fx_LTa2R9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LTa2R9Ast__id_t_data_t* tl;
   struct _fx_Ta2R9Ast__id_t hd;
} _fx_LTa2R9Ast__id_t_data_t, *_fx_LTa2R9Ast__id_t;

typedef struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LTa2R9Ast__id_t_data_t* t1;
} _fx_T2R9Ast__id_tLTa2R9Ast__id_t;

typedef struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t* tl;
   struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t hd;
} _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t, *_fx_LT2R9Ast__id_tLTa2R9Ast__id_t;

typedef struct _fx_R17Ast__defvariant_t {
   struct _fx_R9Ast__id_t dvar_name;
   struct _fx_LR9Ast__id_t_data_t* dvar_templ_args;
   struct _fx_N10Ast__typ_t_data_t* dvar_alias;
   struct _fx_R16Ast__var_flags_t dvar_flags;
   struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t* dvar_cases;
   struct _fx_LR9Ast__id_t_data_t* dvar_ctors;
   struct _fx_rLR9Ast__id_t_data_t* dvar_templ_inst;
   struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t* dvar_ifaces;
   struct _fx_LN12Ast__scope_t_data_t* dvar_scope;
   struct _fx_R10Ast__loc_t dvar_loc;
} _fx_R17Ast__defvariant_t;

typedef struct _fx_rR17Ast__defvariant_t_data_t {
   int_ rc;
   struct _fx_R17Ast__defvariant_t data;
} _fx_rR17Ast__defvariant_t_data_t, *_fx_rR17Ast__defvariant_t;

typedef struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
   struct _fx_R16Ast__fun_flags_t t2;
} _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t;

typedef struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t {
   int_ rc;
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t* tl;
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t hd;
} _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t, *_fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t;

typedef struct _fx_R19Ast__definterface_t {
   struct _fx_R9Ast__id_t di_name;
   struct _fx_R9Ast__id_t di_base;
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t* di_new_methods;
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t* di_all_methods;
   struct _fx_LN12Ast__scope_t_data_t* di_scope;
   struct _fx_R10Ast__loc_t di_loc;
} _fx_R19Ast__definterface_t;

typedef struct _fx_rR19Ast__definterface_t_data_t {
   int_ rc;
   struct _fx_R19Ast__definterface_t data;
} _fx_rR19Ast__definterface_t_data_t, *_fx_rR19Ast__definterface_t;

typedef struct _fx_N14Ast__id_info_t {
   int tag;
   union {
      struct _fx_R13Ast__defval_t IdDVal;
      struct _fx_rR13Ast__deffun_t_data_t* IdFun;
      struct _fx_rR13Ast__defexn_t_data_t* IdExn;
      struct _fx_rR13Ast__deftyp_t_data_t* IdTyp;
      struct _fx_rR17Ast__defvariant_t_data_t* IdVariant;
      struct _fx_rR19Ast__definterface_t_data_t* IdInterface;
      int_ IdModule;
   } u;
} _fx_N14Ast__id_info_t;

typedef struct _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t {
   int_ t0;
   fx_arr_t t1;
   struct _fx_N14Ast__id_info_t t2;
} _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t;

typedef struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t {
   int_ rc;
   union {
      struct _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t t;
   } u;
} _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t, *_fx_Nt9Dynvec__t1N14Ast__id_info_t;

typedef struct _fx_N12Map__color_t {
   int tag;
} _fx_N12Map__color_t;

typedef struct _fx_LN16Ast__env_entry_t_data_t {
   int_ rc;
   struct _fx_LN16Ast__env_entry_t_data_t* tl;
   struct _fx_N16Ast__env_entry_t_data_t* hd;
} _fx_LN16Ast__env_entry_t_data_t, *_fx_LN16Ast__env_entry_t;

typedef struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t {
   struct _fx_N12Map__color_t t0;
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t* t1;
   struct _fx_R9Ast__id_t t2;
   struct _fx_LN16Ast__env_entry_t_data_t* t3;
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t* t4;
} _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t;

typedef struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t {
   int_ rc;
   union {
      struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t
         Node;
   } u;
} _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t, *_fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t;

typedef struct _fx_T2R10Ast__loc_tS {
   struct _fx_R10Ast__loc_t t0;
   fx_str_t t1;
} _fx_T2R10Ast__loc_tS;

typedef struct _fx_T2il {
   int_ t0;
   int64_t t1;
} _fx_T2il;

typedef struct _fx_T2iq {
   int_ t0;
   uint64_t t1;
} _fx_T2iq;

typedef struct _fx_T2id {
   int_ t0;
   double t1;
} _fx_T2id;

typedef struct _fx_N10Ast__lit_t {
   int tag;
   union {
      int64_t LitInt;
      struct _fx_T2il LitSInt;
      struct _fx_T2iq LitUInt;
      struct _fx_T2id LitFloat;
      fx_str_t LitString;
      char_ LitChar;
      bool LitBool;
   } u;
} _fx_N10Ast__lit_t;

typedef struct _fx_rNt6option1N10Ast__typ_t_data_t {
   int_ rc;
   struct _fx_Nt6option1N10Ast__typ_t_data_t* data;
} _fx_rNt6option1N10Ast__typ_t_data_t, *_fx_rNt6option1N10Ast__typ_t;

typedef struct _fx_LN10Ast__typ_t_data_t {
   int_ rc;
   struct _fx_LN10Ast__typ_t_data_t* tl;
   struct _fx_N10Ast__typ_t_data_t* hd;
} _fx_LN10Ast__typ_t_data_t, *_fx_LN10Ast__typ_t;

typedef struct _fx_T2LN10Ast__typ_tN10Ast__typ_t {
   struct _fx_LN10Ast__typ_t_data_t* t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
} _fx_T2LN10Ast__typ_tN10Ast__typ_t;

typedef struct _fx_T2iN10Ast__typ_t {
   int_ t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
} _fx_T2iN10Ast__typ_t;

typedef struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t {
   struct _fx_R16Ast__val_flags_t t0;
   struct _fx_R9Ast__id_t t1;
   struct _fx_N10Ast__typ_t_data_t* t2;
   struct _fx_N10Ast__exp_t_data_t* t3;
} _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t;

typedef struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t {
   int_ rc;
   struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t* tl;
   struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t hd;
} _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t, *_fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t;

typedef struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB {
   struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t* t0;
   bool t1;
} _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB;

typedef struct _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB_data_t {
   int_ rc;
   struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB data;
} _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB_data_t, *_fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB;

typedef struct _fx_T2LN10Ast__typ_tR9Ast__id_t {
   struct _fx_LN10Ast__typ_t_data_t* t0;
   struct _fx_R9Ast__id_t t1;
} _fx_T2LN10Ast__typ_tR9Ast__id_t;

typedef struct _fx_N10Ast__typ_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_rNt6option1N10Ast__typ_t_data_t* TypVar;
      struct _fx_Nt6option1N10Ast__typ_t_data_t* TypVarTuple;
      struct _fx_N10Ast__typ_t_data_t* TypVarArray;
      int_ TypSInt;
      int_ TypUInt;
      int_ TypFloat;
      struct _fx_T2LN10Ast__typ_tN10Ast__typ_t TypFun;
      struct _fx_N10Ast__typ_t_data_t* TypList;
      struct _fx_N10Ast__typ_t_data_t* TypVector;
      struct _fx_LN10Ast__typ_t_data_t* TypTuple;
      struct _fx_N10Ast__typ_t_data_t* TypRef;
      struct _fx_T2iN10Ast__typ_t TypArray;
      struct _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB_data_t* TypRecord;
      struct _fx_T2LN10Ast__typ_tR9Ast__id_t TypApp;
   } u;
} _fx_N10Ast__typ_t_data_t, *_fx_N10Ast__typ_t;

typedef struct _fx_N12Ast__cmpop_t {
   int tag;
} _fx_N12Ast__cmpop_t;

typedef struct _fx_N13Ast__binary_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_N12Ast__cmpop_t OpCmp;
      struct _fx_N12Ast__cmpop_t OpDotCmp;
      struct _fx_N13Ast__binary_t_data_t* OpAugBinary;
   } u;
} _fx_N13Ast__binary_t_data_t, *_fx_N13Ast__binary_t;

typedef struct _fx_N12Ast__unary_t {
   int tag;
} _fx_N12Ast__unary_t;

typedef struct _fx_N12Ast__sctyp_t {
   int tag;
} _fx_N12Ast__sctyp_t;

typedef struct _fx_N13Ast__intrin_t {
   int tag;
   union {
      struct _fx_R9Ast__id_t IntrinMath;
      struct _fx_N12Ast__sctyp_t IntrinSaturate;
   } u;
} _fx_N13Ast__intrin_t;

typedef struct _fx_N15Ast__for_make_t {
   int tag;
} _fx_N15Ast__for_make_t;

typedef struct _fx_R16Ast__for_flags_t {
   bool for_flag_parallel;
   struct _fx_N15Ast__for_make_t for_flag_make;
   bool for_flag_unzip;
   bool for_flag_fold;
   bool for_flag_nested;
} _fx_R16Ast__for_flags_t;

typedef struct _fx_N13Ast__border_t {
   int tag;
} _fx_N13Ast__border_t;

typedef struct _fx_N18Ast__interpolate_t {
   int tag;
} _fx_N18Ast__interpolate_t;

typedef struct _fx_T2BR10Ast__loc_t {
   bool t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2BR10Ast__loc_t;

typedef struct _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t {
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t;

typedef struct _fx_T2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__typ_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t0;
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t1;
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t2;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t3;
} _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__lit_t t0;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t1;
} _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t1;
} _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N13Ast__binary_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_N10Ast__exp_t_data_t* t2;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t3;
} _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N12Ast__unary_t t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_LN10Ast__exp_t_data_t {
   int_ rc;
   struct _fx_LN10Ast__exp_t_data_t* tl;
   struct _fx_N10Ast__exp_t_data_t* hd;
} _fx_LN10Ast__exp_t_data_t, *_fx_LN10Ast__exp_t;

typedef struct _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N13Ast__intrin_t t0;
   struct _fx_LN10Ast__exp_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tN10Ast__exp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
} _fx_T2R9Ast__id_tN10Ast__exp_t;

typedef struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_LN10Ast__exp_t_data_t* t0;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t1;
} _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_LLN10Ast__exp_t_data_t {
   int_ rc;
   struct _fx_LLN10Ast__exp_t_data_t* tl;
   struct _fx_LN10Ast__exp_t_data_t* hd;
} _fx_LLN10Ast__exp_t_data_t, *_fx_LLN10Ast__exp_t;

typedef struct _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_LLN10Ast__exp_t_data_t* t0;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t1;
} _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN10Ast__exp_t hd;
} _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t, *_fx_LT2R9Ast__id_tN10Ast__exp_t;

typedef struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_LN10Ast__exp_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_N13Ast__border_t t1;
   struct _fx_N18Ast__interpolate_t t2;
   struct _fx_LN10Ast__exp_t_data_t* t3;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t4;
} _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T2N10Ast__exp_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2N10Ast__exp_tR10Ast__loc_t;

typedef struct _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_N10Ast__exp_t_data_t* t2;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t3;
} _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T2N10Ast__pat_tN10Ast__exp_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
} _fx_T2N10Ast__pat_tN10Ast__exp_t;

typedef struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t {
   int_ rc;
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* tl;
   struct _fx_T2N10Ast__pat_tN10Ast__exp_t hd;
} _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t, *_fx_LT2N10Ast__pat_tN10Ast__exp_t;

typedef struct _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t {
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* t0;
   struct _fx_N10Ast__pat_t_data_t* t1;
   struct _fx_N10Ast__exp_t_data_t* t2;
   struct _fx_R16Ast__for_flags_t t3;
   struct _fx_R10Ast__loc_t t4;
} _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t;

typedef struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t {
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* t0;
   struct _fx_N10Ast__pat_t_data_t* t1;
} _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t;

typedef struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t {
   int_ rc;
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t* tl;
   struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t hd;
} _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t, *_fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t;

typedef struct _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_R16Ast__for_flags_t t2;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t3;
} _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T2ST2N10Ast__typ_tR10Ast__loc_t {
   fx_str_t t0;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t1;
} _fx_T2ST2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3SST2N10Ast__typ_tR10Ast__loc_t {
   fx_str_t t0;
   fx_str_t t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3SST2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_R16Ast__val_flags_t t2;
   struct _fx_R10Ast__loc_t t3;
} _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t;

typedef struct _fx_T2iR9Ast__id_t {
   int_ t0;
   struct _fx_R9Ast__id_t t1;
} _fx_T2iR9Ast__id_t;

typedef struct _fx_LT2iR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LT2iR9Ast__id_t_data_t* tl;
   struct _fx_T2iR9Ast__id_t hd;
} _fx_LT2iR9Ast__id_t_data_t, *_fx_LT2iR9Ast__id_t;

typedef struct _fx_T2LT2iR9Ast__id_tR10Ast__loc_t {
   struct _fx_LT2iR9Ast__id_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2LT2iR9Ast__id_tR10Ast__loc_t;

typedef struct _fx_T3iLR9Ast__id_tR10Ast__loc_t {
   int_ t0;
   struct _fx_LR9Ast__id_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3iLR9Ast__id_tR10Ast__loc_t;

typedef struct _fx_T2LSR10Ast__loc_t {
   struct _fx_LS_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2LSR10Ast__loc_t;

typedef struct _fx_N10Ast__exp_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_R10Ast__loc_t ExpNop;
      struct _fx_T2BR10Ast__loc_t ExpBreak;
      struct _fx_R10Ast__loc_t ExpContinue;
      struct _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t ExpReturn;
      struct _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpRange;
      struct _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t ExpLit;
      struct _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t ExpIdent;
      struct _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpBinary;
      struct _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpUnary;
      struct _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpIntrin;
      struct _fx_T2R9Ast__id_tN10Ast__exp_t ExpSync;
      struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpSeq;
      struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpMkTuple;
      struct _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpMkArray;
      struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpMkVector;
      struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpMkRecord;
      struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpUpdateRecord;
      struct _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpCall;
      struct _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpAt;
      struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t ExpAssign;
      struct _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpMem;
      struct _fx_T2N10Ast__exp_tR10Ast__loc_t ExpThrow;
      struct _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpIf;
      struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t ExpWhile;
      struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t ExpDoWhile;
      struct _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t ExpFor;
      struct _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t
         ExpMap;
      struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpTryCatch;
      struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpMatch;
      struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t ExpCast;
      struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t ExpTyped;
      struct _fx_T2ST2N10Ast__typ_tR10Ast__loc_t ExpCCode;
      struct _fx_T3SST2N10Ast__typ_tR10Ast__loc_t ExpData;
      struct _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t DefVal;
      struct _fx_rR13Ast__deffun_t_data_t* DefFun;
      struct _fx_rR13Ast__defexn_t_data_t* DefExn;
      struct _fx_rR13Ast__deftyp_t_data_t* DefTyp;
      struct _fx_rR17Ast__defvariant_t_data_t* DefVariant;
      struct _fx_rR19Ast__definterface_t_data_t* DefInterface;
      struct _fx_T2LT2iR9Ast__id_tR10Ast__loc_t DirImport;
      struct _fx_T3iLR9Ast__id_tR10Ast__loc_t DirImportFrom;
      struct _fx_T2LSR10Ast__loc_t DirPragma;
   } u;
} _fx_N10Ast__exp_t_data_t, *_fx_N10Ast__exp_t;

typedef struct _fx_T2N10Ast__lit_tR10Ast__loc_t {
   struct _fx_N10Ast__lit_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2N10Ast__lit_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2R9Ast__id_tR10Ast__loc_t;

typedef struct _fx_T2LN10Ast__pat_tR10Ast__loc_t {
   struct _fx_LN10Ast__pat_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2LN10Ast__pat_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LN10Ast__pat_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tN10Ast__pat_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N10Ast__pat_t_data_t* t1;
} _fx_T2R9Ast__id_tN10Ast__pat_t;

typedef struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN10Ast__pat_t hd;
} _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t, *_fx_LT2R9Ast__id_tN10Ast__pat_t;

typedef struct _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t {
   struct _fx_Nt6option1R9Ast__id_t t0;
   struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_N10Ast__pat_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_R9Ast__id_t t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t;

typedef struct _fx_T2N10Ast__pat_tR10Ast__loc_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2N10Ast__pat_tR10Ast__loc_t;

typedef struct _fx_N10Ast__pat_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_R10Ast__loc_t PatAny;
      struct _fx_T2N10Ast__lit_tR10Ast__loc_t PatLit;
      struct _fx_T2R9Ast__id_tR10Ast__loc_t PatIdent;
      struct _fx_T2LN10Ast__pat_tR10Ast__loc_t PatTuple;
      struct _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t PatVariant;
      struct _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t PatRecord;
      struct _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t PatCons;
      struct _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t PatAs;
      struct _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t PatTyped;
      struct _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t PatWhen;
      struct _fx_T2LN10Ast__pat_tR10Ast__loc_t PatAlt;
      struct _fx_T2N10Ast__pat_tR10Ast__loc_t PatRef;
   } u;
} _fx_N10Ast__pat_t_data_t, *_fx_N10Ast__pat_t;

typedef struct _fx_N16Ast__env_entry_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_R9Ast__id_t EnvId;
      struct _fx_N10Ast__typ_t_data_t* EnvTyp;
   } u;
} _fx_N16Ast__env_entry_t_data_t, *_fx_N16Ast__env_entry_t;

typedef struct _fx_T2SR10Ast__loc_t {
   fx_str_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2SR10Ast__loc_t;

typedef struct _fx_LT2SR10Ast__loc_t_data_t {
   int_ rc;
   struct _fx_LT2SR10Ast__loc_t_data_t* tl;
   struct _fx_T2SR10Ast__loc_t hd;
} _fx_LT2SR10Ast__loc_t_data_t, *_fx_LT2SR10Ast__loc_t;

typedef struct _fx_Li_data_t {
   int_ rc;
   struct _fx_Li_data_t* tl;
   int_ hd;
} _fx_Li_data_t, *_fx_Li;

typedef struct _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t {
   struct _fx_R9Ast__id_t t0;
   fx_str_t t1;
   int_ t2;
   bool t3;
   struct _fx_LN10Ast__exp_t_data_t* t4;
   struct _fx_Li_data_t* t5;
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t t6;
   bool t7;
   int_ t8;
   struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t* t9;
} _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t;

typedef struct _fx_N16Ast__defmodule_t_data_t {
   int_ rc;
   union {
      struct _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t
         defmodule_t;
   } u;
} _fx_N16Ast__defmodule_t_data_t, *_fx_N16Ast__defmodule_t;

typedef struct _fx_N14K_form__klit_t {
   int tag;
   union {
      int64_t KLitInt;
      struct _fx_T2il KLitSInt;
      struct _fx_T2iq KLitUInt;
      struct _fx_T2id KLitFloat;
      fx_str_t KLitString;
      char_ KLitChar;
      bool KLitBool;
      struct _fx_N14K_form__ktyp_t_data_t* KLitNil;
   } u;
} _fx_N14K_form__klit_t;

typedef struct _fx_N14K_form__atom_t {
   int tag;
   union {
      struct _fx_R9Ast__id_t AtomId;
      struct _fx_N14K_form__klit_t AtomLit;
   } u;
} _fx_N14K_form__atom_t;

typedef struct _fx_Nt6option1N14K_form__atom_t {
   int tag;
   union {
      struct _fx_N14K_form__atom_t Some;
   } u;
} _fx_Nt6option1N14K_form__atom_t;

typedef struct _fx_LN14K_form__kexp_t_data_t {
   int_ rc;
   struct _fx_LN14K_form__kexp_t_data_t* tl;
   struct _fx_N14K_form__kexp_t_data_t* hd;
} _fx_LN14K_form__kexp_t_data_t, *_fx_LN14K_form__kexp_t;

typedef struct _fx_T2BN14K_form__atom_t {
   bool t0;
   struct _fx_N14K_form__atom_t t1;
} _fx_T2BN14K_form__atom_t;

typedef struct _fx_LT2BN14K_form__atom_t_data_t {
   int_ rc;
   struct _fx_LT2BN14K_form__atom_t_data_t* tl;
   struct _fx_T2BN14K_form__atom_t hd;
} _fx_LT2BN14K_form__atom_t_data_t, *_fx_LT2BN14K_form__atom_t;

typedef struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t {
   struct _fx_LN14K_form__ktyp_t_data_t* t0;
   struct _fx_N14K_form__ktyp_t_data_t* t1;
} _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t;

typedef struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* t1;
} _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t;

typedef struct _fx_T2iN14K_form__ktyp_t {
   int_ t0;
   struct _fx_N14K_form__ktyp_t_data_t* t1;
} _fx_T2iN14K_form__ktyp_t;

typedef struct _fx_N14K_form__ktyp_t_data_t {
   int_ rc;
   int tag;
   union {
      int_ KTypSInt;
      int_ KTypUInt;
      int_ KTypFloat;
      struct _fx_N14K_form__ktyp_t_data_t* KTypRawPointer;
      struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t KTypFun;
      struct _fx_LN14K_form__ktyp_t_data_t* KTypTuple;
      struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t KTypRecord;
      struct _fx_R9Ast__id_t KTypName;
      struct _fx_T2iN14K_form__ktyp_t KTypArray;
      struct _fx_N14K_form__ktyp_t_data_t* KTypVector;
      struct _fx_N14K_form__ktyp_t_data_t* KTypList;
      struct _fx_N14K_form__ktyp_t_data_t* KTypRef;
   } u;
} _fx_N14K_form__ktyp_t_data_t, *_fx_N14K_form__ktyp_t;

typedef struct _fx_Ta3N14K_form__atom_t {
   struct _fx_N14K_form__atom_t t0;
   struct _fx_N14K_form__atom_t t1;
   struct _fx_N14K_form__atom_t t2;
} _fx_Ta3N14K_form__atom_t;

typedef struct _fx_N13K_form__dom_t {
   int tag;
   union {
      struct _fx_N14K_form__atom_t DomainElem;
      struct _fx_N14K_form__atom_t DomainFast;
      struct _fx_Ta3N14K_form__atom_t DomainRange;
   } u;
} _fx_N13K_form__dom_t;

typedef struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t {
   struct _fx_Nt6option1N14K_form__atom_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t;

typedef struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__ktyp_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__atom_t t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N13Ast__binary_t_data_t* t0;
   struct _fx_N14K_form__atom_t t1;
   struct _fx_N14K_form__atom_t t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N12Ast__unary_t t0;
   struct _fx_N14K_form__atom_t t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_LN14K_form__atom_t_data_t {
   int_ rc;
   struct _fx_LN14K_form__atom_t_data_t* tl;
   struct _fx_N14K_form__atom_t hd;
} _fx_LN14K_form__atom_t_data_t, *_fx_LN14K_form__atom_t;

typedef struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N13Ast__intrin_t t0;
   struct _fx_LN14K_form__atom_t_data_t* t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tN14K_form__kexp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
} _fx_T2R9Ast__id_tN14K_form__kexp_t;

typedef struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LN14K_form__kexp_t_data_t* t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_N14K_form__kexp_t_data_t* t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LN14K_form__atom_t_data_t* t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   int_ t1;
   struct _fx_LN14K_form__atom_t_data_t* t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LN14K_form__atom_t_data_t* t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_R9Ast__id_t t1;
   struct _fx_LN14K_form__atom_t_data_t* t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_LLT2BN14K_form__atom_t_data_t {
   int_ rc;
   struct _fx_LLT2BN14K_form__atom_t_data_t* tl;
   struct _fx_LT2BN14K_form__atom_t_data_t* hd;
} _fx_LLT2BN14K_form__atom_t_data_t, *_fx_LLT2BN14K_form__atom_t;

typedef struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   bool t0;
   struct _fx_LLT2BN14K_form__atom_t_data_t* t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LT2BN14K_form__atom_t_data_t* t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_LN13K_form__dom_t_data_t {
   int_ rc;
   struct _fx_LN13K_form__dom_t_data_t* tl;
   struct _fx_N13K_form__dom_t hd;
} _fx_LN13K_form__dom_t_data_t, *_fx_LN13K_form__dom_t;

typedef struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__atom_t t0;
   struct _fx_N13Ast__border_t t1;
   struct _fx_N18Ast__interpolate_t t2;
   struct _fx_LN13K_form__dom_t_data_t* t3;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t4;
} _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   int_ t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14K_form__atom_t t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t;

typedef struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t {
   struct _fx_LN14K_form__kexp_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
} _fx_T2LN14K_form__kexp_tN14K_form__kexp_t;

typedef struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t {
   int_ rc;
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t* tl;
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t hd;
} _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t, *_fx_LT2LN14K_form__kexp_tN14K_form__kexp_t;

typedef struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t* t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tBR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   bool t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3R9Ast__id_tBR10Ast__loc_t;

typedef struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__atom_t t0;
   struct _fx_N14K_form__ktyp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tN13K_form__dom_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N13K_form__dom_t t1;
} _fx_T2R9Ast__id_tN13K_form__dom_t;

typedef struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN13K_form__dom_t hd;
} _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t, *_fx_LT2R9Ast__id_tN13K_form__dom_t;

typedef struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t1;
   struct _fx_LR9Ast__id_t_data_t* t2;
} _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t;

typedef struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* tl;
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t hd;
} _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t, *_fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t;

typedef struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_R16Ast__for_flags_t t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t {
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t0;
   struct _fx_LR9Ast__id_t_data_t* t1;
   struct _fx_N14K_form__kexp_t_data_t* t2;
   struct _fx_R16Ast__for_flags_t t3;
   struct _fx_R10Ast__loc_t t4;
} _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t;

typedef struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t;

typedef struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t {
   fx_str_t t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t;

typedef struct _fx_N14K_form__kexp_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_R10Ast__loc_t KExpNop;
      struct _fx_R10Ast__loc_t KExpBreak;
      struct _fx_R10Ast__loc_t KExpContinue;
      struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t KExpReturn;
      struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpAtom;
      struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpBinary;
      struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpUnary;
      struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpIntrin;
      struct _fx_T2R9Ast__id_tN14K_form__kexp_t KExpSync;
      struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t KExpSeq;
      struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t KExpIf;
      struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpCall;
      struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpICall;
      struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkTuple;
      struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkRecord;
      struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkClosure;
      struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkArray;
      struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkVector;
      struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t
         KExpAt;
      struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t KExpMem;
      struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t KExpAssign;
      struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMatch;
      struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t KExpTryCatch;
      struct _fx_T3R9Ast__id_tBR10Ast__loc_t KExpThrow;
      struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t KExpCast;
      struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t
         KExpMap;
      struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t KExpFor;
      struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t KExpWhile;
      struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t KExpDoWhile;
      struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t KExpCCode;
      struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t KDefVal;
      struct _fx_rR17K_form__kdeffun_t_data_t* KDefFun;
      struct _fx_rR17K_form__kdefexn_t_data_t* KDefExn;
      struct _fx_rR21K_form__kdefvariant_t_data_t* KDefVariant;
      struct _fx_rR23K_form__kdefinterface_t_data_t* KDefInterface;
      struct _fx_rR17K_form__kdeftyp_t_data_t* KDefTyp;
      struct _fx_rR25K_form__kdefclosurevars_t_data_t* KDefClosureVars;
   } u;
} _fx_N14K_form__kexp_t_data_t, *_fx_N14K_form__kexp_t;

typedef struct _fx_R14Ast__pragmas_t {
   bool pragma_cpp;
   struct _fx_LT2SR10Ast__loc_t_data_t* pragma_clibs;
} _fx_R14Ast__pragmas_t;

typedef struct _fx_R17K_form__kmodule_t {
   struct _fx_R9Ast__id_t km_name;
   int_ km_idx;
   int_ km_toposort_idx;
   fx_str_t km_cname;
   struct _fx_LN14K_form__kexp_t_data_t* km_top;
   struct _fx_Li_data_t* km_deps;
   bool km_skip;
   bool km_main;
   struct _fx_R14Ast__pragmas_t km_pragmas;
} _fx_R17K_form__kmodule_t;

typedef struct _fx_LR17K_form__kmodule_t_data_t {
   int_ rc;
   struct _fx_LR17K_form__kmodule_t_data_t* tl;
   struct _fx_R17K_form__kmodule_t hd;
} _fx_LR17K_form__kmodule_t_data_t, *_fx_LR17K_form__kmodule_t;

typedef struct _fx_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t {
   int_ rc;
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* data;
} _fx_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t, *_fx_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t;

typedef struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t {
   uint64_t hv;
   struct _fx_R9Ast__id_t key;
   struct _fx_N14K_form__atom_t data;
} _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t;

typedef struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t {
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t t0;
   int_ t1;
   int_ t2;
   int_ t3;
   fx_arr_t t4;
   fx_arr_t t5;
} _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t;

typedef struct _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t {
   int_ rc;
   union {
      struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t
         t;
   } u;
} _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t, *_fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t;

typedef struct _fx_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t* t1;
} _fx_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t;

typedef struct _fx_T2iN14K_form__kexp_t {
   int_ t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
} _fx_T2iN14K_form__kexp_t;

typedef struct _fx_Nt6option1T2iN14K_form__kexp_t {
   int tag;
   union {
      struct _fx_T2iN14K_form__kexp_t Some;
   } u;
} _fx_Nt6option1T2iN14K_form__kexp_t;

typedef struct _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t {
   int tag;
   union {
      struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* Some;
   } u;
} _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t;

typedef struct _fx_T2R9Ast__id_tT2iN14K_form__kexp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_T2iN14K_form__kexp_t t1;
} _fx_T2R9Ast__id_tT2iN14K_form__kexp_t;

typedef struct _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t_data_t* tl;
   struct _fx_T2R9Ast__id_tT2iN14K_form__kexp_t hd;
} _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t_data_t, *_fx_LT2R9Ast__id_tT2iN14K_form__kexp_t;

typedef struct _fx_FPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_t {
   int (*fp)(struct _fx_T2iN14K_form__kexp_t*, struct _fx_T2iN14K_form__kexp_t*, bool*, void*);
   fx_fcv_t* fcv;
} _fx_FPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_t;

typedef struct _fx_LT2iN14K_form__kexp_t_data_t {
   int_ rc;
   struct _fx_LT2iN14K_form__kexp_t_data_t* tl;
   struct _fx_T2iN14K_form__kexp_t hd;
} _fx_LT2iN14K_form__kexp_t_data_t, *_fx_LT2iN14K_form__kexp_t;

typedef struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t {
   uint64_t hv;
   struct _fx_R9Ast__id_t key;
   struct _fx_T2iN14K_form__kexp_t data;
} _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t;

typedef struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t {
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t t0;
   int_ t1;
   int_ t2;
   int_ t3;
   fx_arr_t t4;
   fx_arr_t t5;
} _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t;

typedef struct _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t {
   int_ rc;
   union {
      struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t
         t;
   } u;
} _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t, *_fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t;

typedef struct _fx_FPv1R9Ast__id_t {
   int (*fp)(struct _fx_R9Ast__id_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv1R9Ast__id_t;

typedef struct _fx_rLT2iN14K_form__kexp_t_data_t {
   int_ rc;
   struct _fx_LT2iN14K_form__kexp_t_data_t* data;
} _fx_rLT2iN14K_form__kexp_t_data_t, *_fx_rLT2iN14K_form__kexp_t;

typedef struct _fx_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t {
   struct _fx_LN14K_form__kexp_t_data_t* t0;
   struct _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t* t1;
} _fx_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t;

typedef struct _fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t {
   int_ rc;
   struct _fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t* tl;
   struct _fx_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t hd;
} _fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t, *_fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t;

typedef struct {
   int_ rc;
   int_ data;
} _fx_E4Exit_data_t;

typedef struct {
   int_ rc;
   fx_str_t data;
} _fx_E4Fail_data_t;

typedef struct {
   int_ rc;
   struct _fx_T2Ta2iS data;
} _fx_E22LexerUtils__LexerError_data_t;

typedef struct {
   int_ rc;
   struct _fx_T2R10Ast__loc_tS data;
} _fx_E17Ast__CompileError_data_t;

typedef struct {
   int_ rc;
   struct _fx_T2R10Ast__loc_tS data;
} _fx_E18Parser__ParseError_data_t;

static void _fx_free_Nt6option1N10Ast__typ_t(struct _fx_Nt6option1N10Ast__typ_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_N10Ast__typ_t(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_LS(struct _fx_LS_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LS, fx_free_str);
}

static int _fx_cons_LS(fx_str_t* hd, struct _fx_LS_data_t* tl, bool addref_tl, struct _fx_LS_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LS, fx_copy_str);
}

static void _fx_free_T2Ta2iS(struct _fx_T2Ta2iS* dst)
{
   fx_free_str(&dst->t1);
}

static void _fx_copy_T2Ta2iS(struct _fx_T2Ta2iS* src, struct _fx_T2Ta2iS* dst)
{
   dst->t0 = src->t0;
   fx_copy_str(&src->t1, &dst->t1);
}

static void _fx_make_T2Ta2iS(struct _fx_Ta2i* t0, fx_str_t* t1, struct _fx_T2Ta2iS* fx_result)
{
   fx_result->t0 = *t0;
   fx_copy_str(t1, &fx_result->t1);
}

static int _fx_cons_LN12Ast__scope_t(
   struct _fx_N12Ast__scope_t* hd,
   struct _fx_LN12Ast__scope_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN12Ast__scope_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN12Ast__scope_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_R16Ast__val_flags_t(struct _fx_R16Ast__val_flags_t* dst)
{
   fx_free_list_simple(&dst->val_flag_global);
}

static void _fx_copy_R16Ast__val_flags_t(struct _fx_R16Ast__val_flags_t* src, struct _fx_R16Ast__val_flags_t* dst)
{
   dst->val_flag_arg = src->val_flag_arg;
   dst->val_flag_mutable = src->val_flag_mutable;
   dst->val_flag_temp = src->val_flag_temp;
   dst->val_flag_tempref = src->val_flag_tempref;
   dst->val_flag_private = src->val_flag_private;
   dst->val_flag_subarray = src->val_flag_subarray;
   dst->val_flag_instance = src->val_flag_instance;
   dst->val_flag_method = src->val_flag_method;
   dst->val_flag_ctor = src->val_flag_ctor;
   FX_COPY_PTR(src->val_flag_global, &dst->val_flag_global);
}

static void _fx_make_R16Ast__val_flags_t(
   bool r_val_flag_arg,
   bool r_val_flag_mutable,
   bool r_val_flag_temp,
   bool r_val_flag_tempref,
   bool r_val_flag_private,
   bool r_val_flag_subarray,
   bool r_val_flag_instance,
   struct _fx_T2R9Ast__id_ti* r_val_flag_method,
   int_ r_val_flag_ctor,
   struct _fx_LN12Ast__scope_t_data_t* r_val_flag_global,
   struct _fx_R16Ast__val_flags_t* fx_result)
{
   fx_result->val_flag_arg = r_val_flag_arg;
   fx_result->val_flag_mutable = r_val_flag_mutable;
   fx_result->val_flag_temp = r_val_flag_temp;
   fx_result->val_flag_tempref = r_val_flag_tempref;
   fx_result->val_flag_private = r_val_flag_private;
   fx_result->val_flag_subarray = r_val_flag_subarray;
   fx_result->val_flag_instance = r_val_flag_instance;
   fx_result->val_flag_method = *r_val_flag_method;
   fx_result->val_flag_ctor = r_val_flag_ctor;
   FX_COPY_PTR(r_val_flag_global, &fx_result->val_flag_global);
}

static int _fx_cons_LR9Ast__id_t(
   struct _fx_R9Ast__id_t* hd,
   struct _fx_LR9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LR9Ast__id_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_R17K_form__kdefval_t(struct _fx_R17K_form__kdefval_t* dst)
{
   fx_free_str(&dst->kv_cname);
   _fx_free_N14K_form__ktyp_t(&dst->kv_typ);
   _fx_free_R16Ast__val_flags_t(&dst->kv_flags);
}

static void _fx_copy_R17K_form__kdefval_t(struct _fx_R17K_form__kdefval_t* src, struct _fx_R17K_form__kdefval_t* dst)
{
   dst->kv_name = src->kv_name;
   fx_copy_str(&src->kv_cname, &dst->kv_cname);
   FX_COPY_PTR(src->kv_typ, &dst->kv_typ);
   _fx_copy_R16Ast__val_flags_t(&src->kv_flags, &dst->kv_flags);
   dst->kv_loc = src->kv_loc;
}

static void _fx_make_R17K_form__kdefval_t(
   struct _fx_R9Ast__id_t* r_kv_name,
   fx_str_t* r_kv_cname,
   struct _fx_N14K_form__ktyp_t_data_t* r_kv_typ,
   struct _fx_R16Ast__val_flags_t* r_kv_flags,
   struct _fx_R10Ast__loc_t* r_kv_loc,
   struct _fx_R17K_form__kdefval_t* fx_result)
{
   fx_result->kv_name = *r_kv_name;
   fx_copy_str(r_kv_cname, &fx_result->kv_cname);
   FX_COPY_PTR(r_kv_typ, &fx_result->kv_typ);
   _fx_copy_R16Ast__val_flags_t(r_kv_flags, &fx_result->kv_flags);
   fx_result->kv_loc = *r_kv_loc;
}

static void _fx_free_T2R9Ast__id_tN14K_form__ktyp_t(struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* dst)
{
   _fx_free_N14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* src,
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14K_form__ktyp_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN14K_form__ktyp_t, _fx_free_T2R9Ast__id_tN14K_form__ktyp_t);
}

static int _fx_cons_LT2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* hd,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN14K_form__ktyp_t, _fx_copy_T2R9Ast__id_tN14K_form__ktyp_t);
}

static void _fx_free_R23K_form__kdefinterface_t(struct _fx_R23K_form__kdefinterface_t* dst)
{
   fx_free_str(&dst->ki_cname);
   _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&dst->ki_all_methods);
   fx_free_list_simple(&dst->ki_scope);
}

static void _fx_copy_R23K_form__kdefinterface_t(
   struct _fx_R23K_form__kdefinterface_t* src,
   struct _fx_R23K_form__kdefinterface_t* dst)
{
   dst->ki_name = src->ki_name;
   dst->ki_base = src->ki_base;
   fx_copy_str(&src->ki_cname, &dst->ki_cname);
   dst->ki_id = src->ki_id;
   FX_COPY_PTR(src->ki_all_methods, &dst->ki_all_methods);
   FX_COPY_PTR(src->ki_scope, &dst->ki_scope);
   dst->ki_loc = src->ki_loc;
}

static void _fx_make_R23K_form__kdefinterface_t(
   struct _fx_R9Ast__id_t* r_ki_name,
   struct _fx_R9Ast__id_t* r_ki_base,
   fx_str_t* r_ki_cname,
   struct _fx_R9Ast__id_t* r_ki_id,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* r_ki_all_methods,
   struct _fx_LN12Ast__scope_t_data_t* r_ki_scope,
   struct _fx_R10Ast__loc_t* r_ki_loc,
   struct _fx_R23K_form__kdefinterface_t* fx_result)
{
   fx_result->ki_name = *r_ki_name;
   fx_result->ki_base = *r_ki_base;
   fx_copy_str(r_ki_cname, &fx_result->ki_cname);
   fx_result->ki_id = *r_ki_id;
   FX_COPY_PTR(r_ki_all_methods, &fx_result->ki_all_methods);
   FX_COPY_PTR(r_ki_scope, &fx_result->ki_scope);
   fx_result->ki_loc = *r_ki_loc;
}

static void _fx_free_rR23K_form__kdefinterface_t(struct _fx_rR23K_form__kdefinterface_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR23K_form__kdefinterface_t, _fx_free_R23K_form__kdefinterface_t);
}

static int _fx_make_rR23K_form__kdefinterface_t(
   struct _fx_R23K_form__kdefinterface_t* arg,
   struct _fx_rR23K_form__kdefinterface_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR23K_form__kdefinterface_t, _fx_copy_R23K_form__kdefinterface_t);
}

static void _fx_free_R17K_form__kdeffun_t(struct _fx_R17K_form__kdeffun_t* dst)
{
   fx_free_str(&dst->kf_cname);
   fx_free_list_simple(&dst->kf_params);
   _fx_free_N14K_form__ktyp_t(&dst->kf_rt);
   _fx_free_N14K_form__kexp_t(&dst->kf_body);
   fx_free_list_simple(&dst->kf_scope);
}

static void _fx_copy_R17K_form__kdeffun_t(struct _fx_R17K_form__kdeffun_t* src, struct _fx_R17K_form__kdeffun_t* dst)
{
   dst->kf_name = src->kf_name;
   fx_copy_str(&src->kf_cname, &dst->kf_cname);
   FX_COPY_PTR(src->kf_params, &dst->kf_params);
   FX_COPY_PTR(src->kf_rt, &dst->kf_rt);
   FX_COPY_PTR(src->kf_body, &dst->kf_body);
   dst->kf_flags = src->kf_flags;
   dst->kf_closure = src->kf_closure;
   FX_COPY_PTR(src->kf_scope, &dst->kf_scope);
   dst->kf_loc = src->kf_loc;
}

static void _fx_make_R17K_form__kdeffun_t(
   struct _fx_R9Ast__id_t* r_kf_name,
   fx_str_t* r_kf_cname,
   struct _fx_LR9Ast__id_t_data_t* r_kf_params,
   struct _fx_N14K_form__ktyp_t_data_t* r_kf_rt,
   struct _fx_N14K_form__kexp_t_data_t* r_kf_body,
   struct _fx_R16Ast__fun_flags_t* r_kf_flags,
   struct _fx_R25K_form__kdefclosureinfo_t* r_kf_closure,
   struct _fx_LN12Ast__scope_t_data_t* r_kf_scope,
   struct _fx_R10Ast__loc_t* r_kf_loc,
   struct _fx_R17K_form__kdeffun_t* fx_result)
{
   fx_result->kf_name = *r_kf_name;
   fx_copy_str(r_kf_cname, &fx_result->kf_cname);
   FX_COPY_PTR(r_kf_params, &fx_result->kf_params);
   FX_COPY_PTR(r_kf_rt, &fx_result->kf_rt);
   FX_COPY_PTR(r_kf_body, &fx_result->kf_body);
   fx_result->kf_flags = *r_kf_flags;
   fx_result->kf_closure = *r_kf_closure;
   FX_COPY_PTR(r_kf_scope, &fx_result->kf_scope);
   fx_result->kf_loc = *r_kf_loc;
}

static void _fx_free_rR17K_form__kdeffun_t(struct _fx_rR17K_form__kdeffun_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17K_form__kdeffun_t, _fx_free_R17K_form__kdeffun_t);
}

static int _fx_make_rR17K_form__kdeffun_t(
   struct _fx_R17K_form__kdeffun_t* arg,
   struct _fx_rR17K_form__kdeffun_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17K_form__kdeffun_t, _fx_copy_R17K_form__kdeffun_t);
}

static void _fx_free_R17K_form__kdefexn_t(struct _fx_R17K_form__kdefexn_t* dst)
{
   fx_free_str(&dst->ke_cname);
   fx_free_str(&dst->ke_base_cname);
   _fx_free_N14K_form__ktyp_t(&dst->ke_typ);
   fx_free_list_simple(&dst->ke_scope);
}

static void _fx_copy_R17K_form__kdefexn_t(struct _fx_R17K_form__kdefexn_t* src, struct _fx_R17K_form__kdefexn_t* dst)
{
   dst->ke_name = src->ke_name;
   fx_copy_str(&src->ke_cname, &dst->ke_cname);
   fx_copy_str(&src->ke_base_cname, &dst->ke_base_cname);
   FX_COPY_PTR(src->ke_typ, &dst->ke_typ);
   dst->ke_std = src->ke_std;
   dst->ke_tag = src->ke_tag;
   dst->ke_make = src->ke_make;
   FX_COPY_PTR(src->ke_scope, &dst->ke_scope);
   dst->ke_loc = src->ke_loc;
}

static void _fx_make_R17K_form__kdefexn_t(
   struct _fx_R9Ast__id_t* r_ke_name,
   fx_str_t* r_ke_cname,
   fx_str_t* r_ke_base_cname,
   struct _fx_N14K_form__ktyp_t_data_t* r_ke_typ,
   bool r_ke_std,
   struct _fx_R9Ast__id_t* r_ke_tag,
   struct _fx_R9Ast__id_t* r_ke_make,
   struct _fx_LN12Ast__scope_t_data_t* r_ke_scope,
   struct _fx_R10Ast__loc_t* r_ke_loc,
   struct _fx_R17K_form__kdefexn_t* fx_result)
{
   fx_result->ke_name = *r_ke_name;
   fx_copy_str(r_ke_cname, &fx_result->ke_cname);
   fx_copy_str(r_ke_base_cname, &fx_result->ke_base_cname);
   FX_COPY_PTR(r_ke_typ, &fx_result->ke_typ);
   fx_result->ke_std = r_ke_std;
   fx_result->ke_tag = *r_ke_tag;
   fx_result->ke_make = *r_ke_make;
   FX_COPY_PTR(r_ke_scope, &fx_result->ke_scope);
   fx_result->ke_loc = *r_ke_loc;
}

static void _fx_free_rR17K_form__kdefexn_t(struct _fx_rR17K_form__kdefexn_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17K_form__kdefexn_t, _fx_free_R17K_form__kdefexn_t);
}

static int _fx_make_rR17K_form__kdefexn_t(
   struct _fx_R17K_form__kdefexn_t* arg,
   struct _fx_rR17K_form__kdefexn_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17K_form__kdefexn_t, _fx_copy_R17K_form__kdefexn_t);
}

static void _fx_free_LN14K_form__ktyp_t(struct _fx_LN14K_form__ktyp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN14K_form__ktyp_t, _fx_free_N14K_form__ktyp_t);
}

static int _fx_cons_LN14K_form__ktyp_t(
   struct _fx_N14K_form__ktyp_t_data_t* hd,
   struct _fx_LN14K_form__ktyp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN14K_form__ktyp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN14K_form__ktyp_t, FX_COPY_PTR);
}

static void _fx_free_T2R9Ast__id_tLR9Ast__id_t(struct _fx_T2R9Ast__id_tLR9Ast__id_t* dst)
{
   fx_free_list_simple(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tLR9Ast__id_t(
   struct _fx_T2R9Ast__id_tLR9Ast__id_t* src,
   struct _fx_T2R9Ast__id_tLR9Ast__id_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tLR9Ast__id_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LR9Ast__id_t_data_t* t1,
   struct _fx_T2R9Ast__id_tLR9Ast__id_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tLR9Ast__id_t(struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tLR9Ast__id_t, _fx_free_T2R9Ast__id_tLR9Ast__id_t);
}

static int _fx_cons_LT2R9Ast__id_tLR9Ast__id_t(
   struct _fx_T2R9Ast__id_tLR9Ast__id_t* hd,
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tLR9Ast__id_t, _fx_copy_T2R9Ast__id_tLR9Ast__id_t);
}

static void _fx_free_R21K_form__kdefvariant_t(struct _fx_R21K_form__kdefvariant_t* dst)
{
   fx_free_str(&dst->kvar_cname);
   _fx_free_LN14K_form__ktyp_t(&dst->kvar_targs);
   _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&dst->kvar_cases);
   fx_free_list_simple(&dst->kvar_ctors);
   _fx_free_LT2R9Ast__id_tLR9Ast__id_t(&dst->kvar_ifaces);
   fx_free_list_simple(&dst->kvar_scope);
}

static void _fx_copy_R21K_form__kdefvariant_t(
   struct _fx_R21K_form__kdefvariant_t* src,
   struct _fx_R21K_form__kdefvariant_t* dst)
{
   dst->kvar_name = src->kvar_name;
   fx_copy_str(&src->kvar_cname, &dst->kvar_cname);
   dst->kvar_proto = src->kvar_proto;
   dst->kvar_props = src->kvar_props;
   FX_COPY_PTR(src->kvar_targs, &dst->kvar_targs);
   FX_COPY_PTR(src->kvar_cases, &dst->kvar_cases);
   FX_COPY_PTR(src->kvar_ctors, &dst->kvar_ctors);
   dst->kvar_flags = src->kvar_flags;
   FX_COPY_PTR(src->kvar_ifaces, &dst->kvar_ifaces);
   FX_COPY_PTR(src->kvar_scope, &dst->kvar_scope);
   dst->kvar_loc = src->kvar_loc;
}

static void _fx_make_R21K_form__kdefvariant_t(
   struct _fx_R9Ast__id_t* r_kvar_name,
   fx_str_t* r_kvar_cname,
   struct _fx_R9Ast__id_t* r_kvar_proto,
   struct _fx_Nt6option1R17K_form__ktprops_t* r_kvar_props,
   struct _fx_LN14K_form__ktyp_t_data_t* r_kvar_targs,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* r_kvar_cases,
   struct _fx_LR9Ast__id_t_data_t* r_kvar_ctors,
   struct _fx_R16Ast__var_flags_t* r_kvar_flags,
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t* r_kvar_ifaces,
   struct _fx_LN12Ast__scope_t_data_t* r_kvar_scope,
   struct _fx_R10Ast__loc_t* r_kvar_loc,
   struct _fx_R21K_form__kdefvariant_t* fx_result)
{
   fx_result->kvar_name = *r_kvar_name;
   fx_copy_str(r_kvar_cname, &fx_result->kvar_cname);
   fx_result->kvar_proto = *r_kvar_proto;
   fx_result->kvar_props = *r_kvar_props;
   FX_COPY_PTR(r_kvar_targs, &fx_result->kvar_targs);
   FX_COPY_PTR(r_kvar_cases, &fx_result->kvar_cases);
   FX_COPY_PTR(r_kvar_ctors, &fx_result->kvar_ctors);
   fx_result->kvar_flags = *r_kvar_flags;
   FX_COPY_PTR(r_kvar_ifaces, &fx_result->kvar_ifaces);
   FX_COPY_PTR(r_kvar_scope, &fx_result->kvar_scope);
   fx_result->kvar_loc = *r_kvar_loc;
}

static void _fx_free_rR21K_form__kdefvariant_t(struct _fx_rR21K_form__kdefvariant_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR21K_form__kdefvariant_t, _fx_free_R21K_form__kdefvariant_t);
}

static int _fx_make_rR21K_form__kdefvariant_t(
   struct _fx_R21K_form__kdefvariant_t* arg,
   struct _fx_rR21K_form__kdefvariant_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR21K_form__kdefvariant_t, _fx_copy_R21K_form__kdefvariant_t);
}

static void _fx_free_R17K_form__kdeftyp_t(struct _fx_R17K_form__kdeftyp_t* dst)
{
   fx_free_str(&dst->kt_cname);
   _fx_free_LN14K_form__ktyp_t(&dst->kt_targs);
   _fx_free_N14K_form__ktyp_t(&dst->kt_typ);
   fx_free_list_simple(&dst->kt_scope);
}

static void _fx_copy_R17K_form__kdeftyp_t(struct _fx_R17K_form__kdeftyp_t* src, struct _fx_R17K_form__kdeftyp_t* dst)
{
   dst->kt_name = src->kt_name;
   fx_copy_str(&src->kt_cname, &dst->kt_cname);
   dst->kt_proto = src->kt_proto;
   dst->kt_props = src->kt_props;
   FX_COPY_PTR(src->kt_targs, &dst->kt_targs);
   FX_COPY_PTR(src->kt_typ, &dst->kt_typ);
   FX_COPY_PTR(src->kt_scope, &dst->kt_scope);
   dst->kt_loc = src->kt_loc;
}

static void _fx_make_R17K_form__kdeftyp_t(
   struct _fx_R9Ast__id_t* r_kt_name,
   fx_str_t* r_kt_cname,
   struct _fx_R9Ast__id_t* r_kt_proto,
   struct _fx_Nt6option1R17K_form__ktprops_t* r_kt_props,
   struct _fx_LN14K_form__ktyp_t_data_t* r_kt_targs,
   struct _fx_N14K_form__ktyp_t_data_t* r_kt_typ,
   struct _fx_LN12Ast__scope_t_data_t* r_kt_scope,
   struct _fx_R10Ast__loc_t* r_kt_loc,
   struct _fx_R17K_form__kdeftyp_t* fx_result)
{
   fx_result->kt_name = *r_kt_name;
   fx_copy_str(r_kt_cname, &fx_result->kt_cname);
   fx_result->kt_proto = *r_kt_proto;
   fx_result->kt_props = *r_kt_props;
   FX_COPY_PTR(r_kt_targs, &fx_result->kt_targs);
   FX_COPY_PTR(r_kt_typ, &fx_result->kt_typ);
   FX_COPY_PTR(r_kt_scope, &fx_result->kt_scope);
   fx_result->kt_loc = *r_kt_loc;
}

static void _fx_free_rR17K_form__kdeftyp_t(struct _fx_rR17K_form__kdeftyp_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17K_form__kdeftyp_t, _fx_free_R17K_form__kdeftyp_t);
}

static int _fx_make_rR17K_form__kdeftyp_t(
   struct _fx_R17K_form__kdeftyp_t* arg,
   struct _fx_rR17K_form__kdeftyp_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17K_form__kdeftyp_t, _fx_copy_R17K_form__kdeftyp_t);
}

static void _fx_free_R25K_form__kdefclosurevars_t(struct _fx_R25K_form__kdefclosurevars_t* dst)
{
   fx_free_str(&dst->kcv_cname);
   _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&dst->kcv_freevars);
   fx_free_list_simple(&dst->kcv_orig_freevars);
   fx_free_list_simple(&dst->kcv_scope);
}

static void _fx_copy_R25K_form__kdefclosurevars_t(
   struct _fx_R25K_form__kdefclosurevars_t* src,
   struct _fx_R25K_form__kdefclosurevars_t* dst)
{
   dst->kcv_name = src->kcv_name;
   fx_copy_str(&src->kcv_cname, &dst->kcv_cname);
   FX_COPY_PTR(src->kcv_freevars, &dst->kcv_freevars);
   FX_COPY_PTR(src->kcv_orig_freevars, &dst->kcv_orig_freevars);
   FX_COPY_PTR(src->kcv_scope, &dst->kcv_scope);
   dst->kcv_loc = src->kcv_loc;
}

static void _fx_make_R25K_form__kdefclosurevars_t(
   struct _fx_R9Ast__id_t* r_kcv_name,
   fx_str_t* r_kcv_cname,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* r_kcv_freevars,
   struct _fx_LR9Ast__id_t_data_t* r_kcv_orig_freevars,
   struct _fx_LN12Ast__scope_t_data_t* r_kcv_scope,
   struct _fx_R10Ast__loc_t* r_kcv_loc,
   struct _fx_R25K_form__kdefclosurevars_t* fx_result)
{
   fx_result->kcv_name = *r_kcv_name;
   fx_copy_str(r_kcv_cname, &fx_result->kcv_cname);
   FX_COPY_PTR(r_kcv_freevars, &fx_result->kcv_freevars);
   FX_COPY_PTR(r_kcv_orig_freevars, &fx_result->kcv_orig_freevars);
   FX_COPY_PTR(r_kcv_scope, &fx_result->kcv_scope);
   fx_result->kcv_loc = *r_kcv_loc;
}

static void _fx_free_rR25K_form__kdefclosurevars_t(struct _fx_rR25K_form__kdefclosurevars_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR25K_form__kdefclosurevars_t, _fx_free_R25K_form__kdefclosurevars_t);
}

static int _fx_make_rR25K_form__kdefclosurevars_t(
   struct _fx_R25K_form__kdefclosurevars_t* arg,
   struct _fx_rR25K_form__kdefclosurevars_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR25K_form__kdefclosurevars_t, _fx_copy_R25K_form__kdefclosurevars_t);
}

static void _fx_free_N15K_form__kinfo_t(struct _fx_N15K_form__kinfo_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_R17K_form__kdefval_t(&dst->u.KVal); break;
   case 3:
      _fx_free_rR17K_form__kdeffun_t(&dst->u.KFun); break;
   case 4:
      _fx_free_rR17K_form__kdefexn_t(&dst->u.KExn); break;
   case 5:
      _fx_free_rR21K_form__kdefvariant_t(&dst->u.KVariant); break;
   case 6:
      _fx_free_rR25K_form__kdefclosurevars_t(&dst->u.KClosureVars); break;
   case 7:
      _fx_free_rR23K_form__kdefinterface_t(&dst->u.KInterface); break;
   case 8:
      _fx_free_rR17K_form__kdeftyp_t(&dst->u.KTyp); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N15K_form__kinfo_t(struct _fx_N15K_form__kinfo_t* src, struct _fx_N15K_form__kinfo_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_R17K_form__kdefval_t(&src->u.KVal, &dst->u.KVal); break;
   case 3:
      FX_COPY_PTR(src->u.KFun, &dst->u.KFun); break;
   case 4:
      FX_COPY_PTR(src->u.KExn, &dst->u.KExn); break;
   case 5:
      FX_COPY_PTR(src->u.KVariant, &dst->u.KVariant); break;
   case 6:
      FX_COPY_PTR(src->u.KClosureVars, &dst->u.KClosureVars); break;
   case 7:
      FX_COPY_PTR(src->u.KInterface, &dst->u.KInterface); break;
   case 8:
      FX_COPY_PTR(src->u.KTyp, &dst->u.KTyp); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_Nt6option1N10Ast__exp_t(struct _fx_Nt6option1N10Ast__exp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_N10Ast__exp_t(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* dst)
{
   _fx_free_Nt10Hashset__t1R9Ast__id_t(&dst->data);
}

static void _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* src,
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* dst)
{
   dst->hv = src->hv;
   dst->key = src->key;
   FX_COPY_PTR(src->data, &dst->data);
}

static void _fx_make_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   uint64_t r_hv,
   struct _fx_R9Ast__id_t* r_key,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* r_data,
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* fx_result)
{
   fx_result->hv = r_hv;
   fx_result->key = *r_key;
   FX_COPY_PTR(r_data, &fx_result->data);
}

static void
   _fx_free_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t*
      dst)
{
   _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&dst->t0);
   fx_free_arr(&dst->t4);
   fx_free_arr(&dst->t5);
}

static void
   _fx_copy_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t*
      src,
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t*
      dst)
{
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   fx_copy_arr(&src->t4, &dst->t4);
   fx_copy_arr(&src->t5, &dst->t5);
}

static void
   _fx_make_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* t0,
   int_ t1,
   int_ t2,
   int_ t3,
   fx_arr_t* t4,
   fx_arr_t* t5,
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t*
      fx_result)
{
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(t0, &fx_result->t0);
   fx_result->t1 = t1;
   fx_result->t2 = t2;
   fx_result->t3 = t3;
   fx_copy_arr(t4, &fx_result->t4);
   fx_copy_arr(t5, &fx_result->t5);
}

static void _fx_free_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
         &(*dst)->u.t);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(
   struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t* dst)
{
   fx_free_arr(&dst->t4);
   fx_free_arr(&dst->t5);
}

static void _fx_copy_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(
   struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t* src,
   struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   fx_copy_arr(&src->t4, &dst->t4);
   fx_copy_arr(&src->t5, &dst->t5);
}

static void _fx_make_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(
   struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* t0,
   int_ t1,
   int_ t2,
   int_ t3,
   fx_arr_t* t4,
   fx_arr_t* t5,
   struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t* fx_result)
{
   fx_result->t0 = *t0;
   fx_result->t1 = t1;
   fx_result->t2 = t2;
   fx_result->t3 = t3;
   fx_copy_arr(t4, &fx_result->t4);
   fx_copy_arr(t5, &fx_result->t5);
}

static void _fx_free_Nt10Hashset__t1R9Ast__id_t(struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(&(*dst)->u.t);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_R13Ast__defval_t(struct _fx_R13Ast__defval_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->dv_typ);
   _fx_free_R16Ast__val_flags_t(&dst->dv_flags);
   fx_free_list_simple(&dst->dv_scope);
}

static void _fx_copy_R13Ast__defval_t(struct _fx_R13Ast__defval_t* src, struct _fx_R13Ast__defval_t* dst)
{
   dst->dv_name = src->dv_name;
   FX_COPY_PTR(src->dv_typ, &dst->dv_typ);
   _fx_copy_R16Ast__val_flags_t(&src->dv_flags, &dst->dv_flags);
   FX_COPY_PTR(src->dv_scope, &dst->dv_scope);
   dst->dv_loc = src->dv_loc;
}

static void _fx_make_R13Ast__defval_t(
   struct _fx_R9Ast__id_t* r_dv_name,
   struct _fx_N10Ast__typ_t_data_t* r_dv_typ,
   struct _fx_R16Ast__val_flags_t* r_dv_flags,
   struct _fx_LN12Ast__scope_t_data_t* r_dv_scope,
   struct _fx_R10Ast__loc_t* r_dv_loc,
   struct _fx_R13Ast__defval_t* fx_result)
{
   fx_result->dv_name = *r_dv_name;
   FX_COPY_PTR(r_dv_typ, &fx_result->dv_typ);
   _fx_copy_R16Ast__val_flags_t(r_dv_flags, &fx_result->dv_flags);
   FX_COPY_PTR(r_dv_scope, &fx_result->dv_scope);
   fx_result->dv_loc = *r_dv_loc;
}

static void _fx_free_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(&dst->root);
   fx_free_fp(&dst->cmp);
}

static void _fx_copy_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* src,
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* dst)
{
   FX_COPY_PTR(src->root, &dst->root);
   FX_COPY_FP(&src->cmp, &dst->cmp);
}

static void _fx_make_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t* r_root,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* r_cmp,
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* fx_result)
{
   FX_COPY_PTR(r_root, &fx_result->root);
   FX_COPY_FP(r_cmp, &fx_result->cmp);
}

static void _fx_free_LN10Ast__pat_t(struct _fx_LN10Ast__pat_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN10Ast__pat_t, _fx_free_N10Ast__pat_t);
}

static int _fx_cons_LN10Ast__pat_t(
   struct _fx_N10Ast__pat_t_data_t* hd,
   struct _fx_LN10Ast__pat_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN10Ast__pat_t, FX_COPY_PTR);
}

static void _fx_free_rLR9Ast__id_t(struct _fx_rLR9Ast__id_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rLR9Ast__id_t, fx_free_list_simple);
}

static int _fx_make_rLR9Ast__id_t(struct _fx_LR9Ast__id_t_data_t* arg, struct _fx_rLR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rLR9Ast__id_t, FX_COPY_PTR);
}

static void _fx_free_R13Ast__deffun_t(struct _fx_R13Ast__deffun_t* dst)
{
   fx_free_list_simple(&dst->df_templ_args);
   _fx_free_LN10Ast__pat_t(&dst->df_args);
   _fx_free_N10Ast__typ_t(&dst->df_typ);
   _fx_free_N10Ast__exp_t(&dst->df_body);
   fx_free_list_simple(&dst->df_scope);
   _fx_free_rLR9Ast__id_t(&dst->df_templ_inst);
   _fx_free_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(&dst->df_env);
}

static void _fx_copy_R13Ast__deffun_t(struct _fx_R13Ast__deffun_t* src, struct _fx_R13Ast__deffun_t* dst)
{
   dst->df_name = src->df_name;
   FX_COPY_PTR(src->df_templ_args, &dst->df_templ_args);
   FX_COPY_PTR(src->df_args, &dst->df_args);
   FX_COPY_PTR(src->df_typ, &dst->df_typ);
   FX_COPY_PTR(src->df_body, &dst->df_body);
   dst->df_flags = src->df_flags;
   FX_COPY_PTR(src->df_scope, &dst->df_scope);
   dst->df_loc = src->df_loc;
   FX_COPY_PTR(src->df_templ_inst, &dst->df_templ_inst);
   _fx_copy_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(&src->df_env, &dst->df_env);
}

static void _fx_make_R13Ast__deffun_t(
   struct _fx_R9Ast__id_t* r_df_name,
   struct _fx_LR9Ast__id_t_data_t* r_df_templ_args,
   struct _fx_LN10Ast__pat_t_data_t* r_df_args,
   struct _fx_N10Ast__typ_t_data_t* r_df_typ,
   struct _fx_N10Ast__exp_t_data_t* r_df_body,
   struct _fx_R16Ast__fun_flags_t* r_df_flags,
   struct _fx_LN12Ast__scope_t_data_t* r_df_scope,
   struct _fx_R10Ast__loc_t* r_df_loc,
   struct _fx_rLR9Ast__id_t_data_t* r_df_templ_inst,
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* r_df_env,
   struct _fx_R13Ast__deffun_t* fx_result)
{
   fx_result->df_name = *r_df_name;
   FX_COPY_PTR(r_df_templ_args, &fx_result->df_templ_args);
   FX_COPY_PTR(r_df_args, &fx_result->df_args);
   FX_COPY_PTR(r_df_typ, &fx_result->df_typ);
   FX_COPY_PTR(r_df_body, &fx_result->df_body);
   fx_result->df_flags = *r_df_flags;
   FX_COPY_PTR(r_df_scope, &fx_result->df_scope);
   fx_result->df_loc = *r_df_loc;
   FX_COPY_PTR(r_df_templ_inst, &fx_result->df_templ_inst);
   _fx_copy_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(r_df_env, &fx_result->df_env);
}

static void _fx_free_rR13Ast__deffun_t(struct _fx_rR13Ast__deffun_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR13Ast__deffun_t, _fx_free_R13Ast__deffun_t);
}

static int _fx_make_rR13Ast__deffun_t(struct _fx_R13Ast__deffun_t* arg, struct _fx_rR13Ast__deffun_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR13Ast__deffun_t, _fx_copy_R13Ast__deffun_t);
}

static void _fx_free_R13Ast__defexn_t(struct _fx_R13Ast__defexn_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->dexn_typ);
   fx_free_list_simple(&dst->dexn_scope);
}

static void _fx_copy_R13Ast__defexn_t(struct _fx_R13Ast__defexn_t* src, struct _fx_R13Ast__defexn_t* dst)
{
   dst->dexn_name = src->dexn_name;
   FX_COPY_PTR(src->dexn_typ, &dst->dexn_typ);
   FX_COPY_PTR(src->dexn_scope, &dst->dexn_scope);
   dst->dexn_loc = src->dexn_loc;
}

static void _fx_make_R13Ast__defexn_t(
   struct _fx_R9Ast__id_t* r_dexn_name,
   struct _fx_N10Ast__typ_t_data_t* r_dexn_typ,
   struct _fx_LN12Ast__scope_t_data_t* r_dexn_scope,
   struct _fx_R10Ast__loc_t* r_dexn_loc,
   struct _fx_R13Ast__defexn_t* fx_result)
{
   fx_result->dexn_name = *r_dexn_name;
   FX_COPY_PTR(r_dexn_typ, &fx_result->dexn_typ);
   FX_COPY_PTR(r_dexn_scope, &fx_result->dexn_scope);
   fx_result->dexn_loc = *r_dexn_loc;
}

static void _fx_free_rR13Ast__defexn_t(struct _fx_rR13Ast__defexn_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR13Ast__defexn_t, _fx_free_R13Ast__defexn_t);
}

static int _fx_make_rR13Ast__defexn_t(struct _fx_R13Ast__defexn_t* arg, struct _fx_rR13Ast__defexn_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR13Ast__defexn_t, _fx_copy_R13Ast__defexn_t);
}

static void _fx_free_R13Ast__deftyp_t(struct _fx_R13Ast__deftyp_t* dst)
{
   fx_free_list_simple(&dst->dt_templ_args);
   _fx_free_N10Ast__typ_t(&dst->dt_typ);
   fx_free_list_simple(&dst->dt_scope);
}

static void _fx_copy_R13Ast__deftyp_t(struct _fx_R13Ast__deftyp_t* src, struct _fx_R13Ast__deftyp_t* dst)
{
   dst->dt_name = src->dt_name;
   FX_COPY_PTR(src->dt_templ_args, &dst->dt_templ_args);
   FX_COPY_PTR(src->dt_typ, &dst->dt_typ);
   dst->dt_finalized = src->dt_finalized;
   FX_COPY_PTR(src->dt_scope, &dst->dt_scope);
   dst->dt_loc = src->dt_loc;
}

static void _fx_make_R13Ast__deftyp_t(
   struct _fx_R9Ast__id_t* r_dt_name,
   struct _fx_LR9Ast__id_t_data_t* r_dt_templ_args,
   struct _fx_N10Ast__typ_t_data_t* r_dt_typ,
   bool r_dt_finalized,
   struct _fx_LN12Ast__scope_t_data_t* r_dt_scope,
   struct _fx_R10Ast__loc_t* r_dt_loc,
   struct _fx_R13Ast__deftyp_t* fx_result)
{
   fx_result->dt_name = *r_dt_name;
   FX_COPY_PTR(r_dt_templ_args, &fx_result->dt_templ_args);
   FX_COPY_PTR(r_dt_typ, &fx_result->dt_typ);
   fx_result->dt_finalized = r_dt_finalized;
   FX_COPY_PTR(r_dt_scope, &fx_result->dt_scope);
   fx_result->dt_loc = *r_dt_loc;
}

static void _fx_free_rR13Ast__deftyp_t(struct _fx_rR13Ast__deftyp_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR13Ast__deftyp_t, _fx_free_R13Ast__deftyp_t);
}

static int _fx_make_rR13Ast__deftyp_t(struct _fx_R13Ast__deftyp_t* arg, struct _fx_rR13Ast__deftyp_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR13Ast__deftyp_t, _fx_copy_R13Ast__deftyp_t);
}

static void _fx_free_T2R9Ast__id_tN10Ast__typ_t(struct _fx_T2R9Ast__id_tN10Ast__typ_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN10Ast__typ_t(
   struct _fx_T2R9Ast__id_tN10Ast__typ_t* src,
   struct _fx_T2R9Ast__id_tN10Ast__typ_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN10Ast__typ_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N10Ast__typ_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN10Ast__typ_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN10Ast__typ_t(struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN10Ast__typ_t, _fx_free_T2R9Ast__id_tN10Ast__typ_t);
}

static int _fx_cons_LT2R9Ast__id_tN10Ast__typ_t(
   struct _fx_T2R9Ast__id_tN10Ast__typ_t* hd,
   struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN10Ast__typ_t, _fx_copy_T2R9Ast__id_tN10Ast__typ_t);
}

static int _fx_cons_LTa2R9Ast__id_t(
   struct _fx_Ta2R9Ast__id_t* hd,
   struct _fx_LTa2R9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LTa2R9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LTa2R9Ast__id_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_T2R9Ast__id_tLTa2R9Ast__id_t(struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t* dst)
{
   fx_free_list_simple(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tLTa2R9Ast__id_t(
   struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t* src,
   struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tLTa2R9Ast__id_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LTa2R9Ast__id_t_data_t* t1,
   struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tLTa2R9Ast__id_t(struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tLTa2R9Ast__id_t, _fx_free_T2R9Ast__id_tLTa2R9Ast__id_t);
}

static int _fx_cons_LT2R9Ast__id_tLTa2R9Ast__id_t(
   struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t* hd,
   struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tLTa2R9Ast__id_t, _fx_copy_T2R9Ast__id_tLTa2R9Ast__id_t);
}

static void _fx_free_R17Ast__defvariant_t(struct _fx_R17Ast__defvariant_t* dst)
{
   fx_free_list_simple(&dst->dvar_templ_args);
   _fx_free_N10Ast__typ_t(&dst->dvar_alias);
   _fx_free_LT2R9Ast__id_tN10Ast__typ_t(&dst->dvar_cases);
   fx_free_list_simple(&dst->dvar_ctors);
   _fx_free_rLR9Ast__id_t(&dst->dvar_templ_inst);
   _fx_free_LT2R9Ast__id_tLTa2R9Ast__id_t(&dst->dvar_ifaces);
   fx_free_list_simple(&dst->dvar_scope);
}

static void _fx_copy_R17Ast__defvariant_t(struct _fx_R17Ast__defvariant_t* src, struct _fx_R17Ast__defvariant_t* dst)
{
   dst->dvar_name = src->dvar_name;
   FX_COPY_PTR(src->dvar_templ_args, &dst->dvar_templ_args);
   FX_COPY_PTR(src->dvar_alias, &dst->dvar_alias);
   dst->dvar_flags = src->dvar_flags;
   FX_COPY_PTR(src->dvar_cases, &dst->dvar_cases);
   FX_COPY_PTR(src->dvar_ctors, &dst->dvar_ctors);
   FX_COPY_PTR(src->dvar_templ_inst, &dst->dvar_templ_inst);
   FX_COPY_PTR(src->dvar_ifaces, &dst->dvar_ifaces);
   FX_COPY_PTR(src->dvar_scope, &dst->dvar_scope);
   dst->dvar_loc = src->dvar_loc;
}

static void _fx_make_R17Ast__defvariant_t(
   struct _fx_R9Ast__id_t* r_dvar_name,
   struct _fx_LR9Ast__id_t_data_t* r_dvar_templ_args,
   struct _fx_N10Ast__typ_t_data_t* r_dvar_alias,
   struct _fx_R16Ast__var_flags_t* r_dvar_flags,
   struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t* r_dvar_cases,
   struct _fx_LR9Ast__id_t_data_t* r_dvar_ctors,
   struct _fx_rLR9Ast__id_t_data_t* r_dvar_templ_inst,
   struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t* r_dvar_ifaces,
   struct _fx_LN12Ast__scope_t_data_t* r_dvar_scope,
   struct _fx_R10Ast__loc_t* r_dvar_loc,
   struct _fx_R17Ast__defvariant_t* fx_result)
{
   fx_result->dvar_name = *r_dvar_name;
   FX_COPY_PTR(r_dvar_templ_args, &fx_result->dvar_templ_args);
   FX_COPY_PTR(r_dvar_alias, &fx_result->dvar_alias);
   fx_result->dvar_flags = *r_dvar_flags;
   FX_COPY_PTR(r_dvar_cases, &fx_result->dvar_cases);
   FX_COPY_PTR(r_dvar_ctors, &fx_result->dvar_ctors);
   FX_COPY_PTR(r_dvar_templ_inst, &fx_result->dvar_templ_inst);
   FX_COPY_PTR(r_dvar_ifaces, &fx_result->dvar_ifaces);
   FX_COPY_PTR(r_dvar_scope, &fx_result->dvar_scope);
   fx_result->dvar_loc = *r_dvar_loc;
}

static void _fx_free_rR17Ast__defvariant_t(struct _fx_rR17Ast__defvariant_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17Ast__defvariant_t, _fx_free_R17Ast__defvariant_t);
}

static int _fx_make_rR17Ast__defvariant_t(
   struct _fx_R17Ast__defvariant_t* arg,
   struct _fx_rR17Ast__defvariant_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17Ast__defvariant_t, _fx_copy_R17Ast__defvariant_t);
}

static void _fx_free_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->t1);
}

static void _fx_copy_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t* src,
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N10Ast__typ_t_data_t* t1,
   struct _fx_R16Ast__fun_flags_t* t2,
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t,
      _fx_free_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t);
}

static int _fx_cons_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t* hd,
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t,
      _fx_copy_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t);
}

static void _fx_free_R19Ast__definterface_t(struct _fx_R19Ast__definterface_t* dst)
{
   _fx_free_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(&dst->di_new_methods);
   _fx_free_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(&dst->di_all_methods);
   fx_free_list_simple(&dst->di_scope);
}

static void _fx_copy_R19Ast__definterface_t(struct _fx_R19Ast__definterface_t* src, struct _fx_R19Ast__definterface_t* dst)
{
   dst->di_name = src->di_name;
   dst->di_base = src->di_base;
   FX_COPY_PTR(src->di_new_methods, &dst->di_new_methods);
   FX_COPY_PTR(src->di_all_methods, &dst->di_all_methods);
   FX_COPY_PTR(src->di_scope, &dst->di_scope);
   dst->di_loc = src->di_loc;
}

static void _fx_make_R19Ast__definterface_t(
   struct _fx_R9Ast__id_t* r_di_name,
   struct _fx_R9Ast__id_t* r_di_base,
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t* r_di_new_methods,
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t* r_di_all_methods,
   struct _fx_LN12Ast__scope_t_data_t* r_di_scope,
   struct _fx_R10Ast__loc_t* r_di_loc,
   struct _fx_R19Ast__definterface_t* fx_result)
{
   fx_result->di_name = *r_di_name;
   fx_result->di_base = *r_di_base;
   FX_COPY_PTR(r_di_new_methods, &fx_result->di_new_methods);
   FX_COPY_PTR(r_di_all_methods, &fx_result->di_all_methods);
   FX_COPY_PTR(r_di_scope, &fx_result->di_scope);
   fx_result->di_loc = *r_di_loc;
}

static void _fx_free_rR19Ast__definterface_t(struct _fx_rR19Ast__definterface_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR19Ast__definterface_t, _fx_free_R19Ast__definterface_t);
}

static int _fx_make_rR19Ast__definterface_t(
   struct _fx_R19Ast__definterface_t* arg,
   struct _fx_rR19Ast__definterface_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR19Ast__definterface_t, _fx_copy_R19Ast__definterface_t);
}

static void _fx_free_N14Ast__id_info_t(struct _fx_N14Ast__id_info_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_R13Ast__defval_t(&dst->u.IdDVal); break;
   case 3:
      _fx_free_rR13Ast__deffun_t(&dst->u.IdFun); break;
   case 4:
      _fx_free_rR13Ast__defexn_t(&dst->u.IdExn); break;
   case 5:
      _fx_free_rR13Ast__deftyp_t(&dst->u.IdTyp); break;
   case 6:
      _fx_free_rR17Ast__defvariant_t(&dst->u.IdVariant); break;
   case 7:
      _fx_free_rR19Ast__definterface_t(&dst->u.IdInterface); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N14Ast__id_info_t(struct _fx_N14Ast__id_info_t* src, struct _fx_N14Ast__id_info_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_R13Ast__defval_t(&src->u.IdDVal, &dst->u.IdDVal); break;
   case 3:
      FX_COPY_PTR(src->u.IdFun, &dst->u.IdFun); break;
   case 4:
      FX_COPY_PTR(src->u.IdExn, &dst->u.IdExn); break;
   case 5:
      FX_COPY_PTR(src->u.IdTyp, &dst->u.IdTyp); break;
   case 6:
      FX_COPY_PTR(src->u.IdVariant, &dst->u.IdVariant); break;
   case 7:
      FX_COPY_PTR(src->u.IdInterface, &dst->u.IdInterface); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_T3iA1N14Ast__id_info_tN14Ast__id_info_t(struct _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t* dst)
{
   fx_free_arr(&dst->t1);
   _fx_free_N14Ast__id_info_t(&dst->t2);
}

static void _fx_copy_T3iA1N14Ast__id_info_tN14Ast__id_info_t(
   struct _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t* src,
   struct _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t* dst)
{
   dst->t0 = src->t0;
   fx_copy_arr(&src->t1, &dst->t1);
   _fx_copy_N14Ast__id_info_t(&src->t2, &dst->t2);
}

static void _fx_make_T3iA1N14Ast__id_info_tN14Ast__id_info_t(
   int_ t0,
   fx_arr_t* t1,
   struct _fx_N14Ast__id_info_t* t2,
   struct _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t* fx_result)
{
   fx_result->t0 = t0;
   fx_copy_arr(t1, &fx_result->t1);
   _fx_copy_N14Ast__id_info_t(t2, &fx_result->t2);
}

static void _fx_free_Nt9Dynvec__t1N14Ast__id_info_t(struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T3iA1N14Ast__id_info_tN14Ast__id_info_t(&(*dst)->u.t); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_LN16Ast__env_entry_t(struct _fx_LN16Ast__env_entry_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN16Ast__env_entry_t, _fx_free_N16Ast__env_entry_t);
}

static int _fx_cons_LN16Ast__env_entry_t(
   struct _fx_N16Ast__env_entry_t_data_t* hd,
   struct _fx_LN16Ast__env_entry_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN16Ast__env_entry_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN16Ast__env_entry_t, FX_COPY_PTR);
}

static void
   _fx_free_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t*
      dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(&dst->t1);
   _fx_free_LN16Ast__env_entry_t(&dst->t3);
   _fx_free_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(&dst->t4);
}

static void
   _fx_copy_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t*
      src,
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t*
      dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   FX_COPY_PTR(src->t3, &dst->t3);
   FX_COPY_PTR(src->t4, &dst->t4);
}

static void
   _fx_make_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_N12Map__color_t* t0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t* t1,
   struct _fx_R9Ast__id_t* t2,
   struct _fx_LN16Ast__env_entry_t_data_t* t3,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t* t4,
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t*
      fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   FX_COPY_PTR(t3, &fx_result->t3);
   FX_COPY_PTR(t4, &fx_result->t4);
}

static void _fx_free_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(
         &(*dst)->u.Node);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2R10Ast__loc_tS(struct _fx_T2R10Ast__loc_tS* dst)
{
   fx_free_str(&dst->t1);
}

static void _fx_copy_T2R10Ast__loc_tS(struct _fx_T2R10Ast__loc_tS* src, struct _fx_T2R10Ast__loc_tS* dst)
{
   dst->t0 = src->t0;
   fx_copy_str(&src->t1, &dst->t1);
}

static void _fx_make_T2R10Ast__loc_tS(struct _fx_R10Ast__loc_t* t0, fx_str_t* t1, struct _fx_T2R10Ast__loc_tS* fx_result)
{
   fx_result->t0 = *t0;
   fx_copy_str(t1, &fx_result->t1);
}

static void _fx_free_N10Ast__lit_t(struct _fx_N10Ast__lit_t* dst)
{
   switch (dst->tag) {
   case 5:
      fx_free_str(&dst->u.LitString); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N10Ast__lit_t(struct _fx_N10Ast__lit_t* src, struct _fx_N10Ast__lit_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 5:
      fx_copy_str(&src->u.LitString, &dst->u.LitString); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_rNt6option1N10Ast__typ_t(struct _fx_rNt6option1N10Ast__typ_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rNt6option1N10Ast__typ_t, _fx_free_Nt6option1N10Ast__typ_t);
}

static int _fx_make_rNt6option1N10Ast__typ_t(
   struct _fx_Nt6option1N10Ast__typ_t_data_t* arg,
   struct _fx_rNt6option1N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rNt6option1N10Ast__typ_t, FX_COPY_PTR);
}

static void _fx_free_LN10Ast__typ_t(struct _fx_LN10Ast__typ_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN10Ast__typ_t, _fx_free_N10Ast__typ_t);
}

static int _fx_cons_LN10Ast__typ_t(
   struct _fx_N10Ast__typ_t_data_t* hd,
   struct _fx_LN10Ast__typ_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN10Ast__typ_t, FX_COPY_PTR);
}

static void _fx_free_T2LN10Ast__typ_tN10Ast__typ_t(struct _fx_T2LN10Ast__typ_tN10Ast__typ_t* dst)
{
   _fx_free_LN10Ast__typ_t(&dst->t0);
   _fx_free_N10Ast__typ_t(&dst->t1);
}

static void _fx_copy_T2LN10Ast__typ_tN10Ast__typ_t(
   struct _fx_T2LN10Ast__typ_tN10Ast__typ_t* src,
   struct _fx_T2LN10Ast__typ_tN10Ast__typ_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LN10Ast__typ_tN10Ast__typ_t(
   struct _fx_LN10Ast__typ_t_data_t* t0,
   struct _fx_N10Ast__typ_t_data_t* t1,
   struct _fx_T2LN10Ast__typ_tN10Ast__typ_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2iN10Ast__typ_t(struct _fx_T2iN10Ast__typ_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->t1);
}

static void _fx_copy_T2iN10Ast__typ_t(struct _fx_T2iN10Ast__typ_t* src, struct _fx_T2iN10Ast__typ_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2iN10Ast__typ_t(int_ t0, struct _fx_N10Ast__typ_t_data_t* t1, struct _fx_T2iN10Ast__typ_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(
   struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* dst)
{
   _fx_free_R16Ast__val_flags_t(&dst->t0);
   _fx_free_N10Ast__typ_t(&dst->t2);
   _fx_free_N10Ast__exp_t(&dst->t3);
}

static void _fx_copy_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(
   struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* src,
   struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* dst)
{
   _fx_copy_R16Ast__val_flags_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
   FX_COPY_PTR(src->t2, &dst->t2);
   FX_COPY_PTR(src->t3, &dst->t3);
}

static void _fx_make_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(
   struct _fx_R16Ast__val_flags_t* t0,
   struct _fx_R9Ast__id_t* t1,
   struct _fx_N10Ast__typ_t_data_t* t2,
   struct _fx_N10Ast__exp_t_data_t* t3,
   struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* fx_result)
{
   _fx_copy_R16Ast__val_flags_t(t0, &fx_result->t0);
   fx_result->t1 = *t1;
   FX_COPY_PTR(t2, &fx_result->t2);
   FX_COPY_PTR(t3, &fx_result->t3);
}

static void _fx_free_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(
   struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t,
      _fx_free_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t);
}

static int _fx_cons_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(
   struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* hd,
   struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t,
      _fx_copy_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t);
}

static void _fx_free_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(
   struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB* dst)
{
   _fx_free_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&dst->t0);
}

static void _fx_copy_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(
   struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB* src,
   struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(
   struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t* t0,
   bool t1,
   struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = t1;
}

static void _fx_free_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(
   struct _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB,
      _fx_free_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB);
}

static int _fx_make_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(
   struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB* arg,
   struct _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB,
      _fx_copy_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB);
}

static void _fx_free_T2LN10Ast__typ_tR9Ast__id_t(struct _fx_T2LN10Ast__typ_tR9Ast__id_t* dst)
{
   _fx_free_LN10Ast__typ_t(&dst->t0);
}

static void _fx_copy_T2LN10Ast__typ_tR9Ast__id_t(
   struct _fx_T2LN10Ast__typ_tR9Ast__id_t* src,
   struct _fx_T2LN10Ast__typ_tR9Ast__id_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2LN10Ast__typ_tR9Ast__id_t(
   struct _fx_LN10Ast__typ_t_data_t* t0,
   struct _fx_R9Ast__id_t* t1,
   struct _fx_T2LN10Ast__typ_tR9Ast__id_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_N10Ast__typ_t(struct _fx_N10Ast__typ_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 1:
         _fx_free_rNt6option1N10Ast__typ_t(&(*dst)->u.TypVar); break;
      case 2:
         _fx_free_Nt6option1N10Ast__typ_t(&(*dst)->u.TypVarTuple); break;
      case 3:
         _fx_free_N10Ast__typ_t(&(*dst)->u.TypVarArray); break;
      case 14:
         _fx_free_T2LN10Ast__typ_tN10Ast__typ_t(&(*dst)->u.TypFun); break;
      case 15:
         _fx_free_N10Ast__typ_t(&(*dst)->u.TypList); break;
      case 16:
         _fx_free_N10Ast__typ_t(&(*dst)->u.TypVector); break;
      case 17:
         _fx_free_LN10Ast__typ_t(&(*dst)->u.TypTuple); break;
      case 18:
         _fx_free_N10Ast__typ_t(&(*dst)->u.TypRef); break;
      case 19:
         _fx_free_T2iN10Ast__typ_t(&(*dst)->u.TypArray); break;
      case 20:
         _fx_free_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(&(*dst)->u.TypRecord); break;
      case 24:
         _fx_free_T2LN10Ast__typ_tR9Ast__id_t(&(*dst)->u.TypApp); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_N13Ast__binary_t(struct _fx_N13Ast__binary_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 27:
         _fx_free_N13Ast__binary_t(&(*dst)->u.OpAugBinary); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2Nt6option1N10Ast__exp_tR10Ast__loc_t(struct _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t* dst)
{
   _fx_free_Nt6option1N10Ast__exp_t(&dst->t0);
}

static void _fx_copy_T2Nt6option1N10Ast__exp_tR10Ast__loc_t(
   struct _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t* src,
   struct _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt6option1N10Ast__exp_tR10Ast__loc_t(
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2N10Ast__typ_tR10Ast__loc_t(struct _fx_T2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->t0);
}

static void _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__typ_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_Nt6option1N10Ast__exp_t(&dst->t0);
   _fx_free_Nt6option1N10Ast__exp_t(&dst->t1);
   _fx_free_Nt6option1N10Ast__exp_t(&dst->t2);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t0,
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t1,
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t2,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t3,
   struct _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t(struct _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__lit_t(&dst->t0);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_copy_N10Ast__lit_t(&src->t0, &dst->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__lit_t* t0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t1,
   struct _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   _fx_copy_N10Ast__lit_t(t0, &fx_result->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t(struct _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t1,
   struct _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N13Ast__binary_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
   _fx_free_N10Ast__exp_t(&dst->t2);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N13Ast__binary_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_N10Ast__exp_t_data_t* t2,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t3,
   struct _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N12Ast__unary_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_LN10Ast__exp_t(struct _fx_LN10Ast__exp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN10Ast__exp_t, _fx_free_N10Ast__exp_t);
}

static int _fx_cons_LN10Ast__exp_t(
   struct _fx_N10Ast__exp_t_data_t* hd,
   struct _fx_LN10Ast__exp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN10Ast__exp_t, FX_COPY_PTR);
}

static void _fx_free_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_LN10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N13Ast__intrin_t* t0,
   struct _fx_LN10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2R9Ast__id_tN10Ast__exp_t(struct _fx_T2R9Ast__id_tN10Ast__exp_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN10Ast__exp_t(
   struct _fx_T2R9Ast__id_tN10Ast__exp_t* src,
   struct _fx_T2R9Ast__id_tN10Ast__exp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN10Ast__exp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN10Ast__exp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_LN10Ast__exp_t(&dst->t0);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_LN10Ast__exp_t_data_t* t0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t1,
   struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_LLN10Ast__exp_t(struct _fx_LLN10Ast__exp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LLN10Ast__exp_t, _fx_free_LN10Ast__exp_t);
}

static int _fx_cons_LLN10Ast__exp_t(
   struct _fx_LN10Ast__exp_t_data_t* hd,
   struct _fx_LLN10Ast__exp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LLN10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LLN10Ast__exp_t, FX_COPY_PTR);
}

static void _fx_free_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_LLN10Ast__exp_t(&dst->t0);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_LLN10Ast__exp_t_data_t* t0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t1,
   struct _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN10Ast__exp_t(struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN10Ast__exp_t, _fx_free_T2R9Ast__id_tN10Ast__exp_t);
}

static int _fx_cons_LT2R9Ast__id_tN10Ast__exp_t(
   struct _fx_T2R9Ast__id_tN10Ast__exp_t* hd,
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN10Ast__exp_t, _fx_copy_T2R9Ast__id_tN10Ast__exp_t);
}

static void _fx_free_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_LT2R9Ast__id_tN10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_LN10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_LN10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_LN10Ast__exp_t(&dst->t3);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t4);
}

static void _fx_copy_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   FX_COPY_PTR(src->t3, &dst->t3);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t4, &dst->t4);
}

static void _fx_make_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_N13Ast__border_t* t1,
   struct _fx_N18Ast__interpolate_t* t2,
   struct _fx_LN10Ast__exp_t_data_t* t3,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t4,
   struct _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
   fx_result->t2 = *t2;
   FX_COPY_PTR(t3, &fx_result->t3);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t4, &fx_result->t4);
}

static void _fx_free_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t(struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
}

static void _fx_copy_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2N10Ast__exp_tR10Ast__loc_t(struct _fx_T2N10Ast__exp_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
}

static void _fx_copy_T2N10Ast__exp_tR10Ast__loc_t(
   struct _fx_T2N10Ast__exp_tR10Ast__loc_t* src,
   struct _fx_T2N10Ast__exp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N10Ast__exp_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2N10Ast__exp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
   _fx_free_N10Ast__exp_t(&dst->t2);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_N10Ast__exp_t_data_t* t2,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t3,
   struct _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T2N10Ast__pat_tN10Ast__exp_t(struct _fx_T2N10Ast__pat_tN10Ast__exp_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
}

static void _fx_copy_T2N10Ast__pat_tN10Ast__exp_t(
   struct _fx_T2N10Ast__pat_tN10Ast__exp_t* src,
   struct _fx_T2N10Ast__pat_tN10Ast__exp_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2N10Ast__pat_tN10Ast__exp_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__pat_tN10Ast__exp_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2N10Ast__pat_tN10Ast__exp_t, _fx_free_T2N10Ast__pat_tN10Ast__exp_t);
}

static int _fx_cons_LT2N10Ast__pat_tN10Ast__exp_t(
   struct _fx_T2N10Ast__pat_tN10Ast__exp_t* hd,
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2N10Ast__pat_tN10Ast__exp_t, _fx_copy_T2N10Ast__pat_tN10Ast__exp_t);
}

static void _fx_free_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t* dst)
{
   _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(&dst->t0);
   _fx_free_N10Ast__pat_t(&dst->t1);
   _fx_free_N10Ast__exp_t(&dst->t2);
}

static void _fx_copy_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t* src,
   struct _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   dst->t3 = src->t3;
   dst->t4 = src->t4;
}

static void _fx_make_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* t0,
   struct _fx_N10Ast__pat_t_data_t* t1,
   struct _fx_N10Ast__exp_t_data_t* t2,
   struct _fx_R16Ast__for_flags_t* t3,
   struct _fx_R10Ast__loc_t* t4,
   struct _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   fx_result->t3 = *t3;
   fx_result->t4 = *t4;
}

static void _fx_free_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t* dst)
{
   _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(&dst->t0);
   _fx_free_N10Ast__pat_t(&dst->t1);
}

static void _fx_copy_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(
   struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t* src,
   struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* t0,
   struct _fx_N10Ast__pat_t_data_t* t1,
   struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t, _fx_free_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t);
}

static int _fx_cons_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(
   struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t* hd,
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t, _fx_copy_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t);
}

static void
   _fx_free_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t3);
}

static void
   _fx_copy_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void
   _fx_make_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_R16Ast__for_flags_t* t2,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t3,
   struct _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t*
      fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_N10Ast__typ_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_N10Ast__typ_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2ST2N10Ast__typ_tR10Ast__loc_t(struct _fx_T2ST2N10Ast__typ_tR10Ast__loc_t* dst)
{
   fx_free_str(&dst->t0);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2ST2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2ST2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T2ST2N10Ast__typ_tR10Ast__loc_t* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2ST2N10Ast__typ_tR10Ast__loc_t(
   fx_str_t* t0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t1,
   struct _fx_T2ST2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T3SST2N10Ast__typ_tR10Ast__loc_t(struct _fx_T3SST2N10Ast__typ_tR10Ast__loc_t* dst)
{
   fx_free_str(&dst->t0);
   fx_free_str(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3SST2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3SST2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3SST2N10Ast__typ_tR10Ast__loc_t* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   fx_copy_str(&src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3SST2N10Ast__typ_tR10Ast__loc_t(
   fx_str_t* t0,
   fx_str_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3SST2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   fx_copy_str(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t(
   struct _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
   _fx_free_R16Ast__val_flags_t(&dst->t2);
}

static void _fx_copy_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t(
   struct _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t* src,
   struct _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_R16Ast__val_flags_t(&src->t2, &dst->t2);
   dst->t3 = src->t3;
}

static void _fx_make_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_R16Ast__val_flags_t* t2,
   struct _fx_R10Ast__loc_t* t3,
   struct _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_R16Ast__val_flags_t(t2, &fx_result->t2);
   fx_result->t3 = *t3;
}

static int _fx_cons_LT2iR9Ast__id_t(
   struct _fx_T2iR9Ast__id_t* hd,
   struct _fx_LT2iR9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2iR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2iR9Ast__id_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_T2LT2iR9Ast__id_tR10Ast__loc_t(struct _fx_T2LT2iR9Ast__id_tR10Ast__loc_t* dst)
{
   fx_free_list_simple(&dst->t0);
}

static void _fx_copy_T2LT2iR9Ast__id_tR10Ast__loc_t(
   struct _fx_T2LT2iR9Ast__id_tR10Ast__loc_t* src,
   struct _fx_T2LT2iR9Ast__id_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2LT2iR9Ast__id_tR10Ast__loc_t(
   struct _fx_LT2iR9Ast__id_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2LT2iR9Ast__id_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T3iLR9Ast__id_tR10Ast__loc_t(struct _fx_T3iLR9Ast__id_tR10Ast__loc_t* dst)
{
   fx_free_list_simple(&dst->t1);
}

static void _fx_copy_T3iLR9Ast__id_tR10Ast__loc_t(
   struct _fx_T3iLR9Ast__id_tR10Ast__loc_t* src,
   struct _fx_T3iLR9Ast__id_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3iLR9Ast__id_tR10Ast__loc_t(
   int_ t0,
   struct _fx_LR9Ast__id_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3iLR9Ast__id_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2LSR10Ast__loc_t(struct _fx_T2LSR10Ast__loc_t* dst)
{
   _fx_free_LS(&dst->t0);
}

static void _fx_copy_T2LSR10Ast__loc_t(struct _fx_T2LSR10Ast__loc_t* src, struct _fx_T2LSR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2LSR10Ast__loc_t(
   struct _fx_LS_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2LSR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_N10Ast__exp_t(struct _fx_N10Ast__exp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 4:
         _fx_free_T2Nt6option1N10Ast__exp_tR10Ast__loc_t(&(*dst)->u.ExpReturn); break;
      case 5:
         _fx_free_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
            &(*dst)->u.ExpRange);
         break;
      case 6:
         _fx_free_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpLit); break;
      case 7:
         _fx_free_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpIdent); break;
      case 8:
         _fx_free_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpBinary); break;
      case 9:
         _fx_free_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpUnary); break;
      case 10:
         _fx_free_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpIntrin); break;
      case 11:
         _fx_free_T2R9Ast__id_tN10Ast__exp_t(&(*dst)->u.ExpSync); break;
      case 12:
         _fx_free_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpSeq); break;
      case 13:
         _fx_free_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpMkTuple); break;
      case 14:
         _fx_free_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpMkArray); break;
      case 15:
         _fx_free_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpMkVector); break;
      case 16:
         _fx_free_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpMkRecord); break;
      case 17:
         _fx_free_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpUpdateRecord); break;
      case 18:
         _fx_free_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpCall); break;
      case 19:
         _fx_free_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
            &(*dst)->u.ExpAt);
         break;
      case 20:
         _fx_free_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t(&(*dst)->u.ExpAssign); break;
      case 21:
         _fx_free_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpMem); break;
      case 22:
         _fx_free_T2N10Ast__exp_tR10Ast__loc_t(&(*dst)->u.ExpThrow); break;
      case 23:
         _fx_free_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpIf); break;
      case 24:
         _fx_free_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t(&(*dst)->u.ExpWhile); break;
      case 25:
         _fx_free_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t(&(*dst)->u.ExpDoWhile); break;
      case 26:
         _fx_free_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t(&(*dst)->u.ExpFor);
         break;
      case 27:
         _fx_free_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t(
            &(*dst)->u.ExpMap);
         break;
      case 28:
         _fx_free_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpTryCatch); break;
      case 29:
         _fx_free_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpMatch); break;
      case 30:
         _fx_free_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpCast); break;
      case 31:
         _fx_free_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpTyped); break;
      case 32:
         _fx_free_T2ST2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpCCode); break;
      case 33:
         _fx_free_T3SST2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpData); break;
      case 34:
         _fx_free_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t(&(*dst)->u.DefVal); break;
      case 35:
         _fx_free_rR13Ast__deffun_t(&(*dst)->u.DefFun); break;
      case 36:
         _fx_free_rR13Ast__defexn_t(&(*dst)->u.DefExn); break;
      case 37:
         _fx_free_rR13Ast__deftyp_t(&(*dst)->u.DefTyp); break;
      case 38:
         _fx_free_rR17Ast__defvariant_t(&(*dst)->u.DefVariant); break;
      case 39:
         _fx_free_rR19Ast__definterface_t(&(*dst)->u.DefInterface); break;
      case 40:
         _fx_free_T2LT2iR9Ast__id_tR10Ast__loc_t(&(*dst)->u.DirImport); break;
      case 41:
         _fx_free_T3iLR9Ast__id_tR10Ast__loc_t(&(*dst)->u.DirImportFrom); break;
      case 42:
         _fx_free_T2LSR10Ast__loc_t(&(*dst)->u.DirPragma); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2N10Ast__lit_tR10Ast__loc_t(struct _fx_T2N10Ast__lit_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__lit_t(&dst->t0);
}

static void _fx_copy_T2N10Ast__lit_tR10Ast__loc_t(
   struct _fx_T2N10Ast__lit_tR10Ast__loc_t* src,
   struct _fx_T2N10Ast__lit_tR10Ast__loc_t* dst)
{
   _fx_copy_N10Ast__lit_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N10Ast__lit_tR10Ast__loc_t(
   struct _fx_N10Ast__lit_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2N10Ast__lit_tR10Ast__loc_t* fx_result)
{
   _fx_copy_N10Ast__lit_t(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2LN10Ast__pat_tR10Ast__loc_t(struct _fx_T2LN10Ast__pat_tR10Ast__loc_t* dst)
{
   _fx_free_LN10Ast__pat_t(&dst->t0);
}

static void _fx_copy_T2LN10Ast__pat_tR10Ast__loc_t(
   struct _fx_T2LN10Ast__pat_tR10Ast__loc_t* src,
   struct _fx_T2LN10Ast__pat_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2LN10Ast__pat_tR10Ast__loc_t(
   struct _fx_LN10Ast__pat_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2LN10Ast__pat_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t(struct _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t* dst)
{
   _fx_free_LN10Ast__pat_t(&dst->t1);
}

static void _fx_copy_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LN10Ast__pat_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2R9Ast__id_tN10Ast__pat_t(struct _fx_T2R9Ast__id_tN10Ast__pat_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN10Ast__pat_t(
   struct _fx_T2R9Ast__id_tN10Ast__pat_t* src,
   struct _fx_T2R9Ast__id_tN10Ast__pat_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN10Ast__pat_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N10Ast__pat_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN10Ast__pat_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN10Ast__pat_t(struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN10Ast__pat_t, _fx_free_T2R9Ast__id_tN10Ast__pat_t);
}

static int _fx_cons_LT2R9Ast__id_tN10Ast__pat_t(
   struct _fx_T2R9Ast__id_tN10Ast__pat_t* hd,
   struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN10Ast__pat_t, _fx_copy_T2R9Ast__id_tN10Ast__pat_t);
}

static void _fx_free_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t(
   struct _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t* dst)
{
   _fx_free_LT2R9Ast__id_tN10Ast__pat_t(&dst->t1);
}

static void _fx_copy_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t(
   struct _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t* src,
   struct _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t(
   struct _fx_Nt6option1R9Ast__id_t* t0,
   struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t(struct _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
   _fx_free_N10Ast__pat_t(&dst->t1);
}

static void _fx_copy_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t(
   struct _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_N10Ast__pat_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t(struct _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
}

static void _fx_copy_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t(
   struct _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
}

static void _fx_make_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_R9Ast__id_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
   fx_result->t2 = *t2;
}

static void _fx_free_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t(struct _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
   _fx_free_N10Ast__typ_t(&dst->t1);
}

static void _fx_copy_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_N10Ast__typ_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t(struct _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
}

static void _fx_copy_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t(
   struct _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2N10Ast__pat_tR10Ast__loc_t(struct _fx_T2N10Ast__pat_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
}

static void _fx_copy_T2N10Ast__pat_tR10Ast__loc_t(
   struct _fx_T2N10Ast__pat_tR10Ast__loc_t* src,
   struct _fx_T2N10Ast__pat_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N10Ast__pat_tR10Ast__loc_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2N10Ast__pat_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_N10Ast__pat_t(struct _fx_N10Ast__pat_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 2:
         _fx_free_T2N10Ast__lit_tR10Ast__loc_t(&(*dst)->u.PatLit); break;
      case 4:
         _fx_free_T2LN10Ast__pat_tR10Ast__loc_t(&(*dst)->u.PatTuple); break;
      case 5:
         _fx_free_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t(&(*dst)->u.PatVariant); break;
      case 6:
         _fx_free_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t(&(*dst)->u.PatRecord); break;
      case 7:
         _fx_free_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t(&(*dst)->u.PatCons); break;
      case 8:
         _fx_free_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t(&(*dst)->u.PatAs); break;
      case 9:
         _fx_free_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t(&(*dst)->u.PatTyped); break;
      case 10:
         _fx_free_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t(&(*dst)->u.PatWhen); break;
      case 11:
         _fx_free_T2LN10Ast__pat_tR10Ast__loc_t(&(*dst)->u.PatAlt); break;
      case 12:
         _fx_free_T2N10Ast__pat_tR10Ast__loc_t(&(*dst)->u.PatRef); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_N16Ast__env_entry_t(struct _fx_N16Ast__env_entry_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) { case 2:     _fx_free_N10Ast__typ_t(&(*dst)->u.EnvTyp); break; default:    ; } fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2SR10Ast__loc_t(struct _fx_T2SR10Ast__loc_t* dst)
{
   fx_free_str(&dst->t0);
}

static void _fx_copy_T2SR10Ast__loc_t(struct _fx_T2SR10Ast__loc_t* src, struct _fx_T2SR10Ast__loc_t* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2SR10Ast__loc_t(fx_str_t* t0, struct _fx_R10Ast__loc_t* t1, struct _fx_T2SR10Ast__loc_t* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_LT2SR10Ast__loc_t(struct _fx_LT2SR10Ast__loc_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2SR10Ast__loc_t, _fx_free_T2SR10Ast__loc_t);
}

static int _fx_cons_LT2SR10Ast__loc_t(
   struct _fx_T2SR10Ast__loc_t* hd,
   struct _fx_LT2SR10Ast__loc_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2SR10Ast__loc_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2SR10Ast__loc_t, _fx_copy_T2SR10Ast__loc_t);
}

static int _fx_cons_Li(int_ hd, struct _fx_Li_data_t* tl, bool addref_tl, struct _fx_Li_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_Li, FX_COPY_SIMPLE);
}

static void _fx_free_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t(
   struct _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t* dst)
{
   fx_free_str(&dst->t1);
   _fx_free_LN10Ast__exp_t(&dst->t4);
   fx_free_list_simple(&dst->t5);
   _fx_free_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(&dst->t6);
   _fx_free_Nt9Dynvec__t1N14Ast__id_info_t(&dst->t9);
}

static void _fx_copy_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t(
   struct _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t* src,
   struct _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t* dst)
{
   dst->t0 = src->t0;
   fx_copy_str(&src->t1, &dst->t1);
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   FX_COPY_PTR(src->t4, &dst->t4);
   FX_COPY_PTR(src->t5, &dst->t5);
   _fx_copy_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(&src->t6, &dst->t6);
   dst->t7 = src->t7;
   dst->t8 = src->t8;
   FX_COPY_PTR(src->t9, &dst->t9);
}

static void _fx_make_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t(
   struct _fx_R9Ast__id_t* t0,
   fx_str_t* t1,
   int_ t2,
   bool t3,
   struct _fx_LN10Ast__exp_t_data_t* t4,
   struct _fx_Li_data_t* t5,
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* t6,
   bool t7,
   int_ t8,
   struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t* t9,
   struct _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t*
      fx_result)
{
   fx_result->t0 = *t0;
   fx_copy_str(t1, &fx_result->t1);
   fx_result->t2 = t2;
   fx_result->t3 = t3;
   FX_COPY_PTR(t4, &fx_result->t4);
   FX_COPY_PTR(t5, &fx_result->t5);
   _fx_copy_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(t6, &fx_result->t6);
   fx_result->t7 = t7;
   fx_result->t8 = t8;
   FX_COPY_PTR(t9, &fx_result->t9);
}

static void _fx_free_N16Ast__defmodule_t(struct _fx_N16Ast__defmodule_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t(
         &(*dst)->u.defmodule_t);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_N14K_form__klit_t(struct _fx_N14K_form__klit_t* dst)
{
   switch (dst->tag) {
   case 5:
      fx_free_str(&dst->u.KLitString); break;
   case 8:
      _fx_free_N14K_form__ktyp_t(&dst->u.KLitNil); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N14K_form__klit_t(struct _fx_N14K_form__klit_t* src, struct _fx_N14K_form__klit_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 5:
      fx_copy_str(&src->u.KLitString, &dst->u.KLitString); break;
   case 8:
      FX_COPY_PTR(src->u.KLitNil, &dst->u.KLitNil); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_N14K_form__atom_t(struct _fx_N14K_form__atom_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_N14K_form__klit_t(&dst->u.AtomLit); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N14K_form__atom_t(struct _fx_N14K_form__atom_t* src, struct _fx_N14K_form__atom_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_N14K_form__klit_t(&src->u.AtomLit, &dst->u.AtomLit); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_Nt6option1N14K_form__atom_t(struct _fx_Nt6option1N14K_form__atom_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_N14K_form__atom_t(&dst->u.Some); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_Nt6option1N14K_form__atom_t(
   struct _fx_Nt6option1N14K_form__atom_t* src,
   struct _fx_Nt6option1N14K_form__atom_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_N14K_form__atom_t(&src->u.Some, &dst->u.Some); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_LN14K_form__kexp_t(struct _fx_LN14K_form__kexp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN14K_form__kexp_t, _fx_free_N14K_form__kexp_t);
}

static int _fx_cons_LN14K_form__kexp_t(
   struct _fx_N14K_form__kexp_t_data_t* hd,
   struct _fx_LN14K_form__kexp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN14K_form__kexp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN14K_form__kexp_t, FX_COPY_PTR);
}

static void _fx_free_T2BN14K_form__atom_t(struct _fx_T2BN14K_form__atom_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t1);
}

static void _fx_copy_T2BN14K_form__atom_t(struct _fx_T2BN14K_form__atom_t* src, struct _fx_T2BN14K_form__atom_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
}

static void _fx_make_T2BN14K_form__atom_t(bool t0, struct _fx_N14K_form__atom_t* t1, struct _fx_T2BN14K_form__atom_t* fx_result)
{
   fx_result->t0 = t0;
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
}

static void _fx_free_LT2BN14K_form__atom_t(struct _fx_LT2BN14K_form__atom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2BN14K_form__atom_t, _fx_free_T2BN14K_form__atom_t);
}

static int _fx_cons_LT2BN14K_form__atom_t(
   struct _fx_T2BN14K_form__atom_t* hd,
   struct _fx_LT2BN14K_form__atom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2BN14K_form__atom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2BN14K_form__atom_t, _fx_copy_T2BN14K_form__atom_t);
}

static void _fx_free_T2LN14K_form__ktyp_tN14K_form__ktyp_t(struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* dst)
{
   _fx_free_LN14K_form__ktyp_t(&dst->t0);
   _fx_free_N14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__ktyp_tN14K_form__ktyp_t(
   struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* src,
   struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__ktyp_tN14K_form__ktyp_t(
   struct _fx_LN14K_form__ktyp_t_data_t* t0,
   struct _fx_N14K_form__ktyp_t_data_t* t1,
   struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t(struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t* dst)
{
   _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t* src,
   struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* t1,
   struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2iN14K_form__ktyp_t(struct _fx_T2iN14K_form__ktyp_t* dst)
{
   _fx_free_N14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T2iN14K_form__ktyp_t(struct _fx_T2iN14K_form__ktyp_t* src, struct _fx_T2iN14K_form__ktyp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2iN14K_form__ktyp_t(
   int_ t0,
   struct _fx_N14K_form__ktyp_t_data_t* t1,
   struct _fx_T2iN14K_form__ktyp_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_N14K_form__ktyp_t(struct _fx_N14K_form__ktyp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 12:
         _fx_free_N14K_form__ktyp_t(&(*dst)->u.KTypRawPointer); break;
      case 13:
         _fx_free_T2LN14K_form__ktyp_tN14K_form__ktyp_t(&(*dst)->u.KTypFun); break;
      case 14:
         _fx_free_LN14K_form__ktyp_t(&(*dst)->u.KTypTuple); break;
      case 15:
         _fx_free_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t(&(*dst)->u.KTypRecord); break;
      case 17:
         _fx_free_T2iN14K_form__ktyp_t(&(*dst)->u.KTypArray); break;
      case 18:
         _fx_free_N14K_form__ktyp_t(&(*dst)->u.KTypVector); break;
      case 19:
         _fx_free_N14K_form__ktyp_t(&(*dst)->u.KTypList); break;
      case 20:
         _fx_free_N14K_form__ktyp_t(&(*dst)->u.KTypRef); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Ta3N14K_form__atom_t(struct _fx_Ta3N14K_form__atom_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t0);
   _fx_free_N14K_form__atom_t(&dst->t1);
   _fx_free_N14K_form__atom_t(&dst->t2);
}

static void _fx_copy_Ta3N14K_form__atom_t(struct _fx_Ta3N14K_form__atom_t* src, struct _fx_Ta3N14K_form__atom_t* dst)
{
   _fx_copy_N14K_form__atom_t(&src->t0, &dst->t0);
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
   _fx_copy_N14K_form__atom_t(&src->t2, &dst->t2);
}

static void _fx_make_Ta3N14K_form__atom_t(
   struct _fx_N14K_form__atom_t* t0,
   struct _fx_N14K_form__atom_t* t1,
   struct _fx_N14K_form__atom_t* t2,
   struct _fx_Ta3N14K_form__atom_t* fx_result)
{
   _fx_copy_N14K_form__atom_t(t0, &fx_result->t0);
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
   _fx_copy_N14K_form__atom_t(t2, &fx_result->t2);
}

static void _fx_free_N13K_form__dom_t(struct _fx_N13K_form__dom_t* dst)
{
   switch (dst->tag) {
   case 1:
      _fx_free_N14K_form__atom_t(&dst->u.DomainElem); break;
   case 2:
      _fx_free_N14K_form__atom_t(&dst->u.DomainFast); break;
   case 3:
      _fx_free_Ta3N14K_form__atom_t(&dst->u.DomainRange); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N13K_form__dom_t(struct _fx_N13K_form__dom_t* src, struct _fx_N13K_form__dom_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 1:
      _fx_copy_N14K_form__atom_t(&src->u.DomainElem, &dst->u.DomainElem); break;
   case 2:
      _fx_copy_N14K_form__atom_t(&src->u.DomainFast, &dst->u.DomainFast); break;
   case 3:
      _fx_copy_Ta3N14K_form__atom_t(&src->u.DomainRange, &dst->u.DomainRange); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_T2Nt6option1N14K_form__atom_tR10Ast__loc_t(struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t* dst)
{
   _fx_free_Nt6option1N14K_form__atom_t(&dst->t0);
}

static void _fx_copy_T2Nt6option1N14K_form__atom_tR10Ast__loc_t(
   struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t* src,
   struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t* dst)
{
   _fx_copy_Nt6option1N14K_form__atom_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt6option1N14K_form__atom_tR10Ast__loc_t(
   struct _fx_Nt6option1N14K_form__atom_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t* fx_result)
{
   _fx_copy_Nt6option1N14K_form__atom_t(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__ktyp_t(&dst->t0);
}

static void _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__ktyp_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_copy_N14K_form__atom_t(&src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__atom_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   _fx_copy_N14K_form__atom_t(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N13Ast__binary_t(&dst->t0);
   _fx_free_N14K_form__atom_t(&dst->t1);
   _fx_free_N14K_form__atom_t(&dst->t2);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
   _fx_copy_N14K_form__atom_t(&src->t2, &dst->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N13Ast__binary_t_data_t* t0,
   struct _fx_N14K_form__atom_t* t1,
   struct _fx_N14K_form__atom_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
   _fx_copy_N14K_form__atom_t(t2, &fx_result->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N12Ast__unary_t* t0,
   struct _fx_N14K_form__atom_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_LN14K_form__atom_t(struct _fx_LN14K_form__atom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN14K_form__atom_t, _fx_free_N14K_form__atom_t);
}

static int _fx_cons_LN14K_form__atom_t(
   struct _fx_N14K_form__atom_t* hd,
   struct _fx_LN14K_form__atom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN14K_form__atom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN14K_form__atom_t, _fx_copy_N14K_form__atom_t);
}

static void _fx_free_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N13Ast__intrin_t* t0,
   struct _fx_LN14K_form__atom_t_data_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2R9Ast__id_tN14K_form__kexp_t(struct _fx_T2R9Ast__id_tN14K_form__kexp_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN14K_form__kexp_t(
   struct _fx_T2R9Ast__id_tN14K_form__kexp_t* src,
   struct _fx_T2R9Ast__id_tN14K_form__kexp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN14K_form__kexp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN14K_form__kexp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__kexp_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LN14K_form__kexp_t_data_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
   _fx_free_N14K_form__kexp_t(&dst->t2);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_N14K_form__kexp_t_data_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LN14K_form__atom_t_data_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t2);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   int_ t1,
   struct _fx_LN14K_form__atom_t_data_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   fx_result->t1 = t1;
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LN14K_form__atom_t_data_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t2);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_R9Ast__id_t* t1,
   struct _fx_LN14K_form__atom_t_data_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   fx_result->t1 = *t1;
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_LLT2BN14K_form__atom_t(struct _fx_LLT2BN14K_form__atom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LLT2BN14K_form__atom_t, _fx_free_LT2BN14K_form__atom_t);
}

static int _fx_cons_LLT2BN14K_form__atom_t(
   struct _fx_LT2BN14K_form__atom_t_data_t* hd,
   struct _fx_LLT2BN14K_form__atom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LLT2BN14K_form__atom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LLT2BN14K_form__atom_t, FX_COPY_PTR);
}

static void _fx_free_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LLT2BN14K_form__atom_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   bool t0,
   struct _fx_LLT2BN14K_form__atom_t_data_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LT2BN14K_form__atom_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LT2BN14K_form__atom_t_data_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_LN13K_form__dom_t(struct _fx_LN13K_form__dom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN13K_form__dom_t, _fx_free_N13K_form__dom_t);
}

static int _fx_cons_LN13K_form__dom_t(
   struct _fx_N13K_form__dom_t* hd,
   struct _fx_LN13K_form__dom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN13K_form__dom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN13K_form__dom_t, _fx_copy_N13K_form__dom_t);
}

static void _fx_free_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t0);
   _fx_free_LN13K_form__dom_t(&dst->t3);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t4);
}

static void _fx_copy_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_copy_N14K_form__atom_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   FX_COPY_PTR(src->t3, &dst->t3);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t4, &dst->t4);
}

static void _fx_make_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__atom_t* t0,
   struct _fx_N13Ast__border_t* t1,
   struct _fx_N18Ast__interpolate_t* t2,
   struct _fx_LN13K_form__dom_t_data_t* t3,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t4,
   struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t*
      fx_result)
{
   _fx_copy_N14K_form__atom_t(t0, &fx_result->t0);
   fx_result->t1 = *t1;
   fx_result->t2 = *t2;
   FX_COPY_PTR(t3, &fx_result->t3);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t4, &fx_result->t4);
}

static void _fx_free_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   int_ t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   fx_result->t1 = t1;
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t(struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t1);
}

static void _fx_copy_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14K_form__atom_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2LN14K_form__kexp_tN14K_form__kexp_t(struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* dst)
{
   _fx_free_LN14K_form__kexp_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__kexp_tN14K_form__kexp_t(
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* src,
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__kexp_tN14K_form__kexp_t(
   struct _fx_LN14K_form__kexp_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2LN14K_form__kexp_tN14K_form__kexp_t(struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2LN14K_form__kexp_tN14K_form__kexp_t, _fx_free_T2LN14K_form__kexp_tN14K_form__kexp_t);
}

static int _fx_cons_LT2LN14K_form__kexp_tN14K_form__kexp_t(
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* hd,
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2LN14K_form__kexp_tN14K_form__kexp_t, _fx_copy_T2LN14K_form__kexp_tN14K_form__kexp_t);
}

static void _fx_free_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LT2LN14K_form__kexp_tN14K_form__kexp_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t0);
   _fx_free_N14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_copy_N14K_form__atom_t(&src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__atom_t* t0,
   struct _fx_N14K_form__ktyp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   _fx_copy_N14K_form__atom_t(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2R9Ast__id_tN13K_form__dom_t(struct _fx_T2R9Ast__id_tN13K_form__dom_t* dst)
{
   _fx_free_N13K_form__dom_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN13K_form__dom_t(
   struct _fx_T2R9Ast__id_tN13K_form__dom_t* src,
   struct _fx_T2R9Ast__id_tN13K_form__dom_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_N13K_form__dom_t(&src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN13K_form__dom_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N13K_form__dom_t* t1,
   struct _fx_T2R9Ast__id_tN13K_form__dom_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_N13K_form__dom_t(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN13K_form__dom_t(struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN13K_form__dom_t, _fx_free_T2R9Ast__id_tN13K_form__dom_t);
}

static int _fx_cons_LT2R9Ast__id_tN13K_form__dom_t(
   struct _fx_T2R9Ast__id_tN13K_form__dom_t* hd,
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN13K_form__dom_t, _fx_copy_T2R9Ast__id_tN13K_form__dom_t);
}

static void _fx_free_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&dst->t1);
   fx_free_list_simple(&dst->t2);
}

static void _fx_copy_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* src,
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
}

static void _fx_make_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t1,
   struct _fx_LR9Ast__id_t_data_t* t2,
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
}

static void _fx_free_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t,
      _fx_free_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t);
}

static int _fx_cons_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* hd,
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t,
      _fx_copy_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t);
}

static void
   _fx_free_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
      dst)
{
   _fx_free_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void
   _fx_copy_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
      src,
   struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
      dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void
   _fx_make_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_R16Ast__for_flags_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
      fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* dst)
{
   _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&dst->t0);
   fx_free_list_simple(&dst->t1);
   _fx_free_N14K_form__kexp_t(&dst->t2);
}

static void _fx_copy_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* src,
   struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   dst->t3 = src->t3;
   dst->t4 = src->t4;
}

static void _fx_make_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t0,
   struct _fx_LR9Ast__id_t_data_t* t1,
   struct _fx_N14K_form__kexp_t_data_t* t2,
   struct _fx_R16Ast__for_flags_t* t3,
   struct _fx_R10Ast__loc_t* t4,
   struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   fx_result->t3 = *t3;
   fx_result->t4 = *t4;
}

static void _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t* src,
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2ST2N14K_form__ktyp_tR10Ast__loc_t(struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   fx_free_str(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2ST2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2ST2N14K_form__ktyp_tR10Ast__loc_t(
   fx_str_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t(struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_N14K_form__kexp_t(struct _fx_N14K_form__kexp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 4:
         _fx_free_T2Nt6option1N14K_form__atom_tR10Ast__loc_t(&(*dst)->u.KExpReturn); break;
      case 5:
         _fx_free_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpAtom); break;
      case 6:
         _fx_free_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpBinary);
         break;
      case 7:
         _fx_free_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpUnary); break;
      case 8:
         _fx_free_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpIntrin); break;
      case 9:
         _fx_free_T2R9Ast__id_tN14K_form__kexp_t(&(*dst)->u.KExpSync); break;
      case 10:
         _fx_free_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpSeq); break;
      case 11:
         _fx_free_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpIf);
         break;
      case 12:
         _fx_free_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpCall); break;
      case 13:
         _fx_free_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpICall); break;
      case 14:
         _fx_free_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkTuple); break;
      case 15:
         _fx_free_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkRecord); break;
      case 16:
         _fx_free_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkClosure); break;
      case 17:
         _fx_free_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkArray); break;
      case 18:
         _fx_free_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkVector); break;
      case 19:
         _fx_free_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t(
            &(*dst)->u.KExpAt);
         break;
      case 20:
         _fx_free_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMem); break;
      case 21:
         _fx_free_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t(&(*dst)->u.KExpAssign); break;
      case 22:
         _fx_free_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMatch); break;
      case 23:
         _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpTryCatch); break;
      case 25:
         _fx_free_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpCast); break;
      case 26:
         _fx_free_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
            &(*dst)->u.KExpMap);
         break;
      case 27:
         _fx_free_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
            &(*dst)->u.KExpFor);
         break;
      case 28:
         _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(&(*dst)->u.KExpWhile); break;
      case 29:
         _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(&(*dst)->u.KExpDoWhile); break;
      case 30:
         _fx_free_T2ST2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpCCode); break;
      case 31:
         _fx_free_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t(&(*dst)->u.KDefVal); break;
      case 32:
         _fx_free_rR17K_form__kdeffun_t(&(*dst)->u.KDefFun); break;
      case 33:
         _fx_free_rR17K_form__kdefexn_t(&(*dst)->u.KDefExn); break;
      case 34:
         _fx_free_rR21K_form__kdefvariant_t(&(*dst)->u.KDefVariant); break;
      case 35:
         _fx_free_rR23K_form__kdefinterface_t(&(*dst)->u.KDefInterface); break;
      case 36:
         _fx_free_rR17K_form__kdeftyp_t(&(*dst)->u.KDefTyp); break;
      case 37:
         _fx_free_rR25K_form__kdefclosurevars_t(&(*dst)->u.KDefClosureVars); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_R14Ast__pragmas_t(struct _fx_R14Ast__pragmas_t* dst)
{
   _fx_free_LT2SR10Ast__loc_t(&dst->pragma_clibs);
}

static void _fx_copy_R14Ast__pragmas_t(struct _fx_R14Ast__pragmas_t* src, struct _fx_R14Ast__pragmas_t* dst)
{
   dst->pragma_cpp = src->pragma_cpp;
   FX_COPY_PTR(src->pragma_clibs, &dst->pragma_clibs);
}

static void _fx_make_R14Ast__pragmas_t(
   bool r_pragma_cpp,
   struct _fx_LT2SR10Ast__loc_t_data_t* r_pragma_clibs,
   struct _fx_R14Ast__pragmas_t* fx_result)
{
   fx_result->pragma_cpp = r_pragma_cpp;
   FX_COPY_PTR(r_pragma_clibs, &fx_result->pragma_clibs);
}

static void _fx_free_R17K_form__kmodule_t(struct _fx_R17K_form__kmodule_t* dst)
{
   fx_free_str(&dst->km_cname);
   _fx_free_LN14K_form__kexp_t(&dst->km_top);
   fx_free_list_simple(&dst->km_deps);
   _fx_free_R14Ast__pragmas_t(&dst->km_pragmas);
}

static void _fx_copy_R17K_form__kmodule_t(struct _fx_R17K_form__kmodule_t* src, struct _fx_R17K_form__kmodule_t* dst)
{
   dst->km_name = src->km_name;
   dst->km_idx = src->km_idx;
   dst->km_toposort_idx = src->km_toposort_idx;
   fx_copy_str(&src->km_cname, &dst->km_cname);
   FX_COPY_PTR(src->km_top, &dst->km_top);
   FX_COPY_PTR(src->km_deps, &dst->km_deps);
   dst->km_skip = src->km_skip;
   dst->km_main = src->km_main;
   _fx_copy_R14Ast__pragmas_t(&src->km_pragmas, &dst->km_pragmas);
}

static void _fx_make_R17K_form__kmodule_t(
   struct _fx_R9Ast__id_t* r_km_name,
   int_ r_km_idx,
   int_ r_km_toposort_idx,
   fx_str_t* r_km_cname,
   struct _fx_LN14K_form__kexp_t_data_t* r_km_top,
   struct _fx_Li_data_t* r_km_deps,
   bool r_km_skip,
   bool r_km_main,
   struct _fx_R14Ast__pragmas_t* r_km_pragmas,
   struct _fx_R17K_form__kmodule_t* fx_result)
{
   fx_result->km_name = *r_km_name;
   fx_result->km_idx = r_km_idx;
   fx_result->km_toposort_idx = r_km_toposort_idx;
   fx_copy_str(r_km_cname, &fx_result->km_cname);
   FX_COPY_PTR(r_km_top, &fx_result->km_top);
   FX_COPY_PTR(r_km_deps, &fx_result->km_deps);
   fx_result->km_skip = r_km_skip;
   fx_result->km_main = r_km_main;
   _fx_copy_R14Ast__pragmas_t(r_km_pragmas, &fx_result->km_pragmas);
}

static void _fx_free_LR17K_form__kmodule_t(struct _fx_LR17K_form__kmodule_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LR17K_form__kmodule_t, _fx_free_R17K_form__kmodule_t);
}

static int _fx_cons_LR17K_form__kmodule_t(
   struct _fx_R17K_form__kmodule_t* hd,
   struct _fx_LR17K_form__kmodule_t_data_t* tl,
   bool addref_tl,
   struct _fx_LR17K_form__kmodule_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LR17K_form__kmodule_t, _fx_copy_R17K_form__kmodule_t);
}

static void _fx_free_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t,
      _fx_free_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t);
}

static int _fx_make_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* arg,
   struct _fx_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, FX_COPY_PTR);
}

static void _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->data);
}

static void _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t* src,
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t* dst)
{
   dst->hv = src->hv;
   dst->key = src->key;
   _fx_copy_N14K_form__atom_t(&src->data, &dst->data);
}

static void _fx_make_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(
   uint64_t r_hv,
   struct _fx_R9Ast__id_t* r_key,
   struct _fx_N14K_form__atom_t* r_data,
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t* fx_result)
{
   fx_result->hv = r_hv;
   fx_result->key = *r_key;
   _fx_copy_N14K_form__atom_t(r_data, &fx_result->data);
}

static void
   _fx_free_T6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t*
      dst)
{
   _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(&dst->t0);
   fx_free_arr(&dst->t4);
   fx_free_arr(&dst->t5);
}

static void
   _fx_copy_T6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t*
      src,
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t*
      dst)
{
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   fx_copy_arr(&src->t4, &dst->t4);
   fx_copy_arr(&src->t5, &dst->t5);
}

static void
   _fx_make_T6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t* t0,
   int_ t1,
   int_ t2,
   int_ t3,
   fx_arr_t* t4,
   fx_arr_t* t5,
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t*
      fx_result)
{
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(t0, &fx_result->t0);
   fx_result->t1 = t1;
   fx_result->t2 = t2;
   fx_result->t3 = t3;
   fx_copy_arr(t4, &fx_result->t4);
   fx_copy_arr(t5, &fx_result->t5);
}

static void _fx_free_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(
         &(*dst)->u.t);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(&dst->t1);
}

static void _fx_copy_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t* src,
   struct _fx_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t* t1,
   struct _fx_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2iN14K_form__kexp_t(struct _fx_T2iN14K_form__kexp_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T2iN14K_form__kexp_t(struct _fx_T2iN14K_form__kexp_t* src, struct _fx_T2iN14K_form__kexp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2iN14K_form__kexp_t(
   int_ t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_T2iN14K_form__kexp_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_Nt6option1T2iN14K_form__kexp_t(struct _fx_Nt6option1T2iN14K_form__kexp_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_T2iN14K_form__kexp_t(&dst->u.Some); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_Nt6option1T2iN14K_form__kexp_t(
   struct _fx_Nt6option1T2iN14K_form__kexp_t* src,
   struct _fx_Nt6option1T2iN14K_form__kexp_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_T2iN14K_form__kexp_t(&src->u.Some, &dst->u.Some); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_Nt6option1Nt10Hashset__t1R9Ast__id_t(struct _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&dst->u.Some); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_Nt6option1Nt10Hashset__t1R9Ast__id_t(
   struct _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t* src,
   struct _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      FX_COPY_PTR(src->u.Some, &dst->u.Some); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_T2R9Ast__id_tT2iN14K_form__kexp_t(struct _fx_T2R9Ast__id_tT2iN14K_form__kexp_t* dst)
{
   _fx_free_T2iN14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_T2R9Ast__id_tT2iN14K_form__kexp_t* src,
   struct _fx_T2R9Ast__id_tT2iN14K_form__kexp_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_T2iN14K_form__kexp_t(&src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_T2iN14K_form__kexp_t* t1,
   struct _fx_T2R9Ast__id_tT2iN14K_form__kexp_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_T2iN14K_form__kexp_t(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tT2iN14K_form__kexp_t(struct _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tT2iN14K_form__kexp_t, _fx_free_T2R9Ast__id_tT2iN14K_form__kexp_t);
}

static int _fx_cons_LT2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_T2R9Ast__id_tT2iN14K_form__kexp_t* hd,
   struct _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tT2iN14K_form__kexp_t, _fx_copy_T2R9Ast__id_tT2iN14K_form__kexp_t);
}

static void _fx_free_LT2iN14K_form__kexp_t(struct _fx_LT2iN14K_form__kexp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2iN14K_form__kexp_t, _fx_free_T2iN14K_form__kexp_t);
}

static int _fx_cons_LT2iN14K_form__kexp_t(
   struct _fx_T2iN14K_form__kexp_t* hd,
   struct _fx_LT2iN14K_form__kexp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2iN14K_form__kexp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2iN14K_form__kexp_t, _fx_copy_T2iN14K_form__kexp_t);
}

static void _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t* dst)
{
   _fx_free_T2iN14K_form__kexp_t(&dst->data);
}

static void _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t* src,
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t* dst)
{
   dst->hv = src->hv;
   dst->key = src->key;
   _fx_copy_T2iN14K_form__kexp_t(&src->data, &dst->data);
}

static void _fx_make_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
   uint64_t r_hv,
   struct _fx_R9Ast__id_t* r_key,
   struct _fx_T2iN14K_form__kexp_t* r_data,
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t* fx_result)
{
   fx_result->hv = r_hv;
   fx_result->key = *r_key;
   _fx_copy_T2iN14K_form__kexp_t(r_data, &fx_result->data);
}

static void
   _fx_free_T6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t*
      dst)
{
   _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(&dst->t0);
   fx_free_arr(&dst->t4);
   fx_free_arr(&dst->t5);
}

static void
   _fx_copy_T6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t*
      src,
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t*
      dst)
{
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   fx_copy_arr(&src->t4, &dst->t4);
   fx_copy_arr(&src->t5, &dst->t5);
}

static void
   _fx_make_T6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t* t0,
   int_ t1,
   int_ t2,
   int_ t3,
   fx_arr_t* t4,
   fx_arr_t* t5,
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t*
      fx_result)
{
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(t0, &fx_result->t0);
   fx_result->t1 = t1;
   fx_result->t2 = t2;
   fx_result->t3 = t3;
   fx_copy_arr(t4, &fx_result->t4);
   fx_copy_arr(t5, &fx_result->t5);
}

static void _fx_free_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
         &(*dst)->u.t);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_rLT2iN14K_form__kexp_t(struct _fx_rLT2iN14K_form__kexp_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rLT2iN14K_form__kexp_t, _fx_free_LT2iN14K_form__kexp_t);
}

static int _fx_make_rLT2iN14K_form__kexp_t(
   struct _fx_LT2iN14K_form__kexp_t_data_t* arg,
   struct _fx_rLT2iN14K_form__kexp_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rLT2iN14K_form__kexp_t, FX_COPY_PTR);
}

static void _fx_free_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t* dst)
{
   _fx_free_LN14K_form__kexp_t(&dst->t0);
   _fx_free_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t* src,
   struct _fx_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_LN14K_form__kexp_t_data_t* t0,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t* t1,
   struct _fx_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t,
      _fx_free_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t);
}

static int _fx_cons_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t* hd,
   struct _fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t,
      _fx_copy_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t);
}

_fx_Nt6option1T2iN14K_form__kexp_t _fx_g19K_copy_n_skip__None = { 1 };
_fx_Nt6option1Nt10Hashset__t1R9Ast__id_t _fx_g21K_copy_n_skip__None1_ = { 1 };
static int _fx_M13K_copy_n_skipFM6qsort_v5iiA1T2iN14K_form__kexp_tFPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_ti(
   int_ lo_0,
   int_ hi_0,
   fx_arr_t* arr_0,
   struct _fx_FPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_t* lt_0,
   int_ prefix_0,
   void* fx_fv);

FX_EXTERN_C int _fx_M7HashmapFM9makeindexA1i1i(int_ size_0, fx_arr_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_F9make_FailE1S(fx_str_t* arg0, fx_exn_t* fx_result);

FX_EXTERN_C int _fx_F6assertv1B(bool f_0, void* fx_fv);

FX_EXTERN_C int _fx_M7HashsetFM9makeindexA1i1i(int_ size_0, fx_arr_t* fx_result, void* fx_fv);

FX_EXTERN_C_VAL(fx_arr_t _fx_g16Ast__all_modules)
FX_EXTERN_C int _fx_M6K_formFM8get_kvalRM9kdefval_t2R9Ast__id_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R17K_form__kdefval_t* fx_result,
   void* fx_fv);

FX_EXTERN_C_VAL(struct _fx_R10Ast__loc_t _fx_g10Ast__noloc)
FX_EXTERN_C int _fx_M6K_formFM7KExpNopN14K_form__kexp_t1R10Ast__loc_t(
   struct _fx_R10Ast__loc_t* arg0,
   struct _fx_N14K_form__kexp_t_data_t** fx_result);

FX_EXTERN_C_VAL(struct _fx_R9Ast__id_t _fx_g9Ast__noid)
FX_EXTERN_C int _fx_M3AstFM16empty_id_hashsetNt10Hashset__t1RM4id_t1i(
   int_ size0_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM7used_byNt10Hashset__t1R9Ast__id_t2LN14K_form__kexp_ti(
   struct _fx_LN14K_form__kexp_t_data_t* code_0,
   int_ size0_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM17calc_sets_closurei3iLRM4id_tNt10Hashmap__t2RM4id_tNt10Hashset__t1RM4id_t(
   int_ iters_0,
   struct _fx_LR9Ast__id_t_data_t* all_ids_0,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* all_sets_0,
   int_* fx_result,
   void* fx_fv);

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM7make_fpFPv1R9Ast__id_t4rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tNt10Hashset__t1R9Ast__id_tiA1i(
   struct _fx_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* arg0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* arg1,
   int_ arg2,
   fx_arr_t* arg3,
   struct _fx_FPv1R9Ast__id_t* fx_result);

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM7make_fpFPv1R9Ast__id_t2rLT2iN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_rLT2iN14K_form__kexp_t_data_t* arg0,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t* arg1,
   struct _fx_FPv1R9Ast__id_t* fx_result);

static int _fx_M13K_copy_n_skipFM10__lambda__B2T2iN14K_form__kexp_tT2iN14K_form__kexp_t(
   struct _fx_T2iN14K_form__kexp_t* arg0_0,
   struct _fx_T2iN14K_form__kexp_t* arg1_0,
   bool* fx_result,
   void* fx_fv);

FX_EXTERN_C void _fx_M6K_formFM6AtomIdN14K_form__atom_t1R9Ast__id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_N14K_form__atom_t* fx_result);

FX_EXTERN_C int _fx_M6K_formFM9code2kexpN14K_form__kexp_t2LN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_LN14K_form__kexp_t_data_t* code_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14K_form__kexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int
   _fx_M8K_inlineFM11subst_namesT2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t4iN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_tB(
   int_ km_idx_0,
   struct _fx_N14K_form__kexp_t_data_t* e_0,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t* subst_map0_0,
   bool rename_0,
   struct _fx_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t* fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM9kexp2codeLN14K_form__kexp_t1N14K_form__kexp_t(
   struct _fx_N14K_form__kexp_t_data_t* e_0,
   struct _fx_LN14K_form__kexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C void _fx_M6K_formFM4KValN15K_form__kinfo_t1RM9kdefval_t(
   struct _fx_R17K_form__kdefval_t* arg0,
   struct _fx_N15K_form__kinfo_t* fx_result);

FX_EXTERN_C int _fx_M6K_formFM13set_idk_entryv2R9Ast__id_tN15K_form__kinfo_t(
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_N15K_form__kinfo_t* info_0,
   void* fx_fv);

static int _fx_M13K_copy_n_skipFM10__lambda__v1R9Ast__id_t(struct _fx_R9Ast__id_t* n_0, void* fx_fv);

static int _fx_M13K_copy_n_skipFM12__lambda__1_v1R9Ast__id_t(struct _fx_R9Ast__id_t* n_0, void* fx_fv);

typedef struct {
   int_ rc;
   fx_free_t free_f;
   struct _fx_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* t0;
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* t1;
   int_ t2;
   fx_arr_t t3;
} _fx_M13K_copy_n_skipFM10__lambda__v1R9Ast__id_t_cldata_t;

FX_EXTERN_C void _fx_free_M13K_copy_n_skipFM10__lambda__v1R9Ast__id_t(
   _fx_M13K_copy_n_skipFM10__lambda__v1R9Ast__id_t_cldata_t* dst)
{
   _fx_free_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&dst->t0);
   _fx_free_Nt10Hashset__t1R9Ast__id_t(&dst->t1);
   FX_FREE_ARR(&dst->t3);
   fx_free(dst);
}

typedef struct {
   int_ rc;
   fx_free_t free_f;
   struct _fx_rLT2iN14K_form__kexp_t_data_t* t0;
   struct _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t* t1;
} _fx_M13K_copy_n_skipFM12__lambda__1_v1R9Ast__id_t_cldata_t;

FX_EXTERN_C void _fx_free_M13K_copy_n_skipFM12__lambda__1_v1R9Ast__id_t(
   _fx_M13K_copy_n_skipFM12__lambda__1_v1R9Ast__id_t_cldata_t* dst)
{
   _fx_free_rLT2iN14K_form__kexp_t(&dst->t0);
   _fx_free_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t(&dst->t1);
   fx_free(dst);
}

FX_EXTERN_C void _fx_M13K_copy_n_skipFM4SomeNt6option1T2iN14K_form__kexp_t1T2iN14K_form__kexp_t(
   struct _fx_T2iN14K_form__kexp_t* arg0,
   struct _fx_Nt6option1T2iN14K_form__kexp_t* fx_result)
{
   fx_result->tag = 2;
   _fx_copy_T2iN14K_form__kexp_t(arg0, &fx_result->u.Some);
}

FX_EXTERN_C void _fx_M13K_copy_n_skipFM4SomeNt6option1Nt10Hashset__t1R9Ast__id_t1Nt10Hashset__t1R9Ast__id_t(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* arg0,
   struct _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t* fx_result)
{
   fx_result->tag = 2;
   FX_COPY_PTR(arg0, &fx_result->u.Some);
}

FX_EXTERN_C int_ _fx_M13K_copy_n_skipFM6lengthi1LT2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t_data_t* l,
   void* fx_fv)
{
   
return fx_list_length(l);

}

FX_EXTERN_C void _fx_M13K_copy_n_skipFM5link2LN14K_form__kexp_t2LN14K_form__kexp_tLN14K_form__kexp_t(
   struct _fx_LN14K_form__kexp_t_data_t* l1,
   struct _fx_LN14K_form__kexp_t_data_t* l2,
   struct _fx_LN14K_form__kexp_t_data_t** fx_result,
   void* fx_fv)
{
   
fx_link_lists(l1, l2, fx_result);

}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM7__add__LN14K_form__kexp_t2LN14K_form__kexp_tLN14K_form__kexp_t(
   struct _fx_LN14K_form__kexp_t_data_t* l1_0,
   struct _fx_LN14K_form__kexp_t_data_t* l2_0,
   struct _fx_LN14K_form__kexp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if (l1_0 == 0) {
      FX_COPY_PTR(l2_0, fx_result);
   }
   else if (l2_0 == 0) {
      FX_COPY_PTR(l1_0, fx_result);
   }
   else {
      _fx_LN14K_form__kexp_t v_0 = 0;
      _fx_LN14K_form__kexp_t lstend_0 = 0;
      _fx_LN14K_form__kexp_t lst_0 = l1_0;
      for (; lst_0; lst_0 = lst_0->tl) {
         _fx_N14K_form__kexp_t x_0 = lst_0->hd;
         _fx_LN14K_form__kexp_t node_0 = 0;
         FX_CALL(_fx_cons_LN14K_form__kexp_t(x_0, 0, false, &node_0), _fx_catch_0);
         FX_LIST_APPEND(v_0, lstend_0, node_0);

      _fx_catch_0: ;
         FX_CHECK_EXN(_fx_catch_1);
      }
      _fx_M13K_copy_n_skipFM5link2LN14K_form__kexp_t2LN14K_form__kexp_tLN14K_form__kexp_t(v_0, l2_0, fx_result, 0);

   _fx_catch_1: ;
      if (v_0) {
         _fx_free_LN14K_form__kexp_t(&v_0);
      }
   }
   return fx_status;
}

FX_EXTERN_C void _fx_M13K_copy_n_skipFM6_swap_v3A1T2iN14K_form__kexp_tii(fx_arr_t* arr, int_ i, int_ j, void* fx_fv)
{
   
size_t esz = arr->dim[0].step;
    if(esz % sizeof(int) == 0) {
        int* ptr0 = (int*)(arr->data + i*esz);
        int* ptr1 = (int*)(arr->data + j*esz);
        esz /= sizeof(int);
        for( size_t k = 0; k < esz; k++ ) {
            int t0 = ptr0[k], t1 = ptr1[k];
            ptr0[k] = t1; ptr1[k] = t0;
        }
    } else {
        char* ptr0 = arr->data + i*esz;
        char* ptr1 = arr->data + j*esz;
        for( size_t k = 0; k < esz; k++ ) {
            char t0 = ptr0[k], t1 = ptr1[k];
            ptr0[k] = t1; ptr1[k] = t0;
        }
    }

}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM4sortv3A1T2iN14K_form__kexp_tFPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_ti(
   fx_arr_t* arr_0,
   struct _fx_FPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_t* lt_0,
   int_ prefix_0,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(
      _fx_M13K_copy_n_skipFM6qsort_v5iiA1T2iN14K_form__kexp_tFPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_ti(0,
         FX_ARR_SIZE(*arr_0, 0) - 1, arr_0, lt_0, prefix_0, 0), _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M13K_copy_n_skipFM6qsort_v5iiA1T2iN14K_form__kexp_tFPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_ti(
   int_ lo_0,
   int_ hi_0,
   fx_arr_t* arr_0,
   struct _fx_FPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_t* lt_0,
   int_ prefix_0,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int_ lo_1 = lo_0;
   int_ hi_1 = hi_0;
   for (;;) {
      _fx_T2iN14K_form__kexp_t a_0 = {0};
      _fx_T2iN14K_form__kexp_t b_0 = {0};
      _fx_T2iN14K_form__kexp_t p_0 = {0};
      _fx_T2iN14K_form__kexp_t p_1 = {0};
      _fx_T2iN14K_form__kexp_t a_1 = {0};
      _fx_T2iN14K_form__kexp_t a_2 = {0};
      _fx_T2iN14K_form__kexp_t b_1 = {0};
      int_ lo_2 = lo_1;
      int_ hi_2 = hi_1;
      if (lo_2 + 1 < hi_2) {
         int_ m_0 = (lo_2 + hi_2) / 2;
         FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, lo_2), _fx_catch_2);
         _fx_copy_T2iN14K_form__kexp_t(FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, lo_2), &a_0);
         FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, m_0), _fx_catch_2);
         _fx_copy_T2iN14K_form__kexp_t(FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, m_0), &b_0);
         FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, hi_2), _fx_catch_2);
         _fx_copy_T2iN14K_form__kexp_t(FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, hi_2), &p_0);
         bool v_0;
         FX_CALL(lt_0->fp(&a_0, &b_0, &v_0, lt_0->fcv), _fx_catch_2);
         if (v_0) {
            bool v_1;
            FX_CALL(lt_0->fp(&b_0, &p_0, &v_1, lt_0->fcv), _fx_catch_2);
            if (v_1) {
               FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, m_0), _fx_catch_2);
               _fx_T2iN14K_form__kexp_t* v_2 = FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, m_0);
               _fx_free_T2iN14K_form__kexp_t(v_2);
               _fx_copy_T2iN14K_form__kexp_t(&p_0, v_2);
               _fx_copy_T2iN14K_form__kexp_t(&b_0, &p_1);
            }
            else {
               bool v_3;
               FX_CALL(lt_0->fp(&a_0, &p_0, &v_3, lt_0->fcv), _fx_catch_2);
               if (v_3) {
                  _fx_copy_T2iN14K_form__kexp_t(&p_0, &p_1);
               }
               else {
                  FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, lo_2), _fx_catch_2);
                  _fx_T2iN14K_form__kexp_t* v_4 = FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, lo_2);
                  _fx_free_T2iN14K_form__kexp_t(v_4);
                  _fx_copy_T2iN14K_form__kexp_t(&p_0, v_4);
                  _fx_copy_T2iN14K_form__kexp_t(&a_0, &p_1);
               }
            }
         }
         else {
            bool v_5;
            FX_CALL(lt_0->fp(&a_0, &p_0, &v_5, lt_0->fcv), _fx_catch_2);
            if (v_5) {
               FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, lo_2), _fx_catch_2);
               _fx_T2iN14K_form__kexp_t* v_6 = FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, lo_2);
               _fx_free_T2iN14K_form__kexp_t(v_6);
               _fx_copy_T2iN14K_form__kexp_t(&p_0, v_6);
               _fx_copy_T2iN14K_form__kexp_t(&a_0, &p_1);
            }
            else {
               bool v_7;
               FX_CALL(lt_0->fp(&b_0, &p_0, &v_7, lt_0->fcv), _fx_catch_2);
               if (v_7) {
                  _fx_copy_T2iN14K_form__kexp_t(&p_0, &p_1);
               }
               else {
                  FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, m_0), _fx_catch_2);
                  _fx_T2iN14K_form__kexp_t* v_8 = FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, m_0);
                  _fx_free_T2iN14K_form__kexp_t(v_8);
                  _fx_copy_T2iN14K_form__kexp_t(&p_0, v_8);
                  _fx_copy_T2iN14K_form__kexp_t(&b_0, &p_1);
               }
            }
         }
         int_ __fold_result___0 = lo_2;
         int_ n_0 = FX_LOOP_COUNT(lo_2, hi_2, 1);
         for (int_ j_0 = 0; j_0 < n_0; j_0++) {
            _fx_T2iN14K_form__kexp_t v_9 = {0};
            int_ j_1 = lo_2 + j_0 * 1;
            int_ i0_0 = __fold_result___0;
            FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, j_1), _fx_catch_0);
            _fx_copy_T2iN14K_form__kexp_t(FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, j_1), &v_9);
            bool v_10;
            FX_CALL(lt_0->fp(&v_9, &p_1, &v_10, lt_0->fcv), _fx_catch_0);
            int_ v_11;
            if (v_10) {
               _fx_M13K_copy_n_skipFM6_swap_v3A1T2iN14K_form__kexp_tii(arr_0, i0_0, j_1, 0); v_11 = i0_0 + 1;
            }
            else {
               v_11 = i0_0;
            }
            __fold_result___0 = v_11;

         _fx_catch_0: ;
            _fx_free_T2iN14K_form__kexp_t(&v_9);
            FX_CHECK_EXN(_fx_catch_2);
         }
         int_ i0_1 = __fold_result___0;
         FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, i0_1), _fx_catch_2);
         _fx_copy_T2iN14K_form__kexp_t(FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, i0_1), &a_1);
         FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, hi_2), _fx_catch_2);
         _fx_T2iN14K_form__kexp_t* v_12 = FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, hi_2);
         _fx_free_T2iN14K_form__kexp_t(v_12);
         _fx_copy_T2iN14K_form__kexp_t(&a_1, v_12);
         FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, i0_1), _fx_catch_2);
         _fx_T2iN14K_form__kexp_t* v_13 = FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, i0_1);
         _fx_free_T2iN14K_form__kexp_t(v_13);
         _fx_copy_T2iN14K_form__kexp_t(&p_1, v_13);
         int_ i1_0 = hi_2;
         int_ n_1 = FX_LOOP_COUNT(i0_1, hi_2, 1);
         for (int_ j_2 = 0; j_2 < n_1; j_2++) {
            _fx_T2iN14K_form__kexp_t v_14 = {0};
            int_ j_3 = i0_1 + j_2 * 1;
            int_ v_15 = j_3 + 1;
            FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, v_15), _fx_catch_1);
            _fx_copy_T2iN14K_form__kexp_t(FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, v_15), &v_14);
            bool v_16;
            FX_CALL(lt_0->fp(&p_1, &v_14, &v_16, lt_0->fcv), _fx_catch_1);
            if (v_16) {
               i1_0 = j_3; FX_BREAK(_fx_catch_1);
            }

         _fx_catch_1: ;
            _fx_free_T2iN14K_form__kexp_t(&v_14);
            FX_CHECK_BREAK();
            FX_CHECK_EXN(_fx_catch_2);
         }
         if (i0_1 - lo_2 < hi_2 - i1_0) {
            if (i1_0 < prefix_0) {
               FX_CALL(
                  _fx_M13K_copy_n_skipFM6qsort_v5iiA1T2iN14K_form__kexp_tFPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_ti(i1_0 + 1,
                     hi_2, arr_0, lt_0, prefix_0, 0), _fx_catch_2);
            }
            lo_1 = lo_2;
            hi_1 = i0_1 - 1;
         }
         else {
            FX_CALL(
               _fx_M13K_copy_n_skipFM6qsort_v5iiA1T2iN14K_form__kexp_tFPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_ti(lo_2,
                  i0_1 - 1, arr_0, lt_0, prefix_0, 0), _fx_catch_2);
            if (i1_0 < prefix_0) {
               lo_1 = i1_0 + 1; hi_1 = hi_2;
            }
            else {
               FX_BREAK(_fx_catch_2);
            }
         }
      }
      else if (lo_2 < hi_2) {
         FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, lo_2), _fx_catch_2);
         _fx_copy_T2iN14K_form__kexp_t(FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, lo_2), &a_2);
         FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, hi_2), _fx_catch_2);
         _fx_copy_T2iN14K_form__kexp_t(FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, hi_2), &b_1);
         bool v_17;
         FX_CALL(lt_0->fp(&b_1, &a_2, &v_17, lt_0->fcv), _fx_catch_2);
         if (v_17) {
            FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, hi_2), _fx_catch_2);
            _fx_T2iN14K_form__kexp_t* v_18 = FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, hi_2);
            _fx_free_T2iN14K_form__kexp_t(v_18);
            _fx_copy_T2iN14K_form__kexp_t(&a_2, v_18);
            FX_CHKIDX(FX_CHKIDX1(*arr_0, 0, lo_2), _fx_catch_2);
            _fx_T2iN14K_form__kexp_t* v_19 = FX_PTR_1D(_fx_T2iN14K_form__kexp_t, *arr_0, lo_2);
            _fx_free_T2iN14K_form__kexp_t(v_19);
            _fx_copy_T2iN14K_form__kexp_t(&b_1, v_19);
            FX_BREAK(_fx_catch_2);
         }
         else {
            FX_BREAK(_fx_catch_2);
         }
      }
      else {
         FX_BREAK(_fx_catch_2);
      }

   _fx_catch_2: ;
      _fx_free_T2iN14K_form__kexp_t(&b_1);
      _fx_free_T2iN14K_form__kexp_t(&a_2);
      _fx_free_T2iN14K_form__kexp_t(&a_1);
      _fx_free_T2iN14K_form__kexp_t(&p_1);
      _fx_free_T2iN14K_form__kexp_t(&p_0);
      _fx_free_T2iN14K_form__kexp_t(&b_0);
      _fx_free_T2iN14K_form__kexp_t(&a_0);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM4sortLT2iN14K_form__kexp_t2LT2iN14K_form__kexp_tFPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_t(
   struct _fx_LT2iN14K_form__kexp_t_data_t* l_0,
   struct _fx_FPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_t* lt_0,
   struct _fx_LT2iN14K_form__kexp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if (l_0 == 0) {
      FX_COPY_PTR(l_0, fx_result); goto _fx_endmatch_0;
   }
   if (l_0 != 0) {
      if (l_0->tl == 0) {
         FX_COPY_PTR(l_0, fx_result); goto _fx_endmatch_0;
      }
   }
   if (l_0 != 0) {
      _fx_LT2iN14K_form__kexp_t v_0 = l_0->tl;
      if (v_0 != 0) {
         if (v_0->tl == 0) {
            _fx_LT2iN14K_form__kexp_t v_1 = 0;
            _fx_T2iN14K_form__kexp_t* b_0 = &v_0->hd;
            _fx_T2iN14K_form__kexp_t* a_0 = &l_0->hd;
            bool v_2;
            FX_CALL(lt_0->fp(b_0, a_0, &v_2, lt_0->fcv), _fx_catch_0);
            if (v_2) {
               FX_CALL(_fx_cons_LT2iN14K_form__kexp_t(a_0, 0, true, &v_1), _fx_catch_0);
               FX_CALL(_fx_cons_LT2iN14K_form__kexp_t(b_0, v_1, true, fx_result), _fx_catch_0);
            }
            else {
               FX_COPY_PTR(l_0, fx_result);
            }

         _fx_catch_0: ;
            if (v_1) {
               _fx_free_LT2iN14K_form__kexp_t(&v_1);
            }
            goto _fx_endmatch_0;
         }
      }
   }
   fx_arr_t arr_0 = {0};
   _fx_T2iN14K_form__kexp_t* dstptr_0 = 0;
   _fx_LT2iN14K_form__kexp_t lst_0 = l_0;
   int_ len_0 = fx_list_length(lst_0);
   {
      const int_ shape_0[] = { len_0 };
      FX_CALL(
         fx_make_arr(1, shape_0, sizeof(_fx_T2iN14K_form__kexp_t), (fx_free_t)_fx_free_T2iN14K_form__kexp_t,
            (fx_copy_t)_fx_copy_T2iN14K_form__kexp_t, 0, &arr_0), _fx_catch_2);
   }
   dstptr_0 = (_fx_T2iN14K_form__kexp_t*)arr_0.data;
   for (; lst_0; lst_0 = lst_0->tl, dstptr_0++) {
      _fx_T2iN14K_form__kexp_t* x_0 = &lst_0->hd; _fx_copy_T2iN14K_form__kexp_t(x_0, dstptr_0);
   }
   FX_CALL(
      _fx_M13K_copy_n_skipFM4sortv3A1T2iN14K_form__kexp_tFPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_ti(&arr_0, lt_0,
         FX_ARR_SIZE(arr_0, 0), 0), _fx_catch_2);
   _fx_LT2iN14K_form__kexp_t lstend_0 = 0;
   int_ ni_0 = FX_ARR_SIZE(arr_0, 0);
   _fx_T2iN14K_form__kexp_t* ptr_arr_0 = FX_PTR_1D(_fx_T2iN14K_form__kexp_t, arr_0, 0);
   for (int_ i_0 = 0; i_0 < ni_0; i_0++) {
      _fx_T2iN14K_form__kexp_t x_1 = {0};
      _fx_copy_T2iN14K_form__kexp_t(ptr_arr_0 + i_0, &x_1);
      _fx_LT2iN14K_form__kexp_t node_0 = 0;
      FX_CALL(_fx_cons_LT2iN14K_form__kexp_t(&x_1, 0, false, &node_0), _fx_catch_1);
      FX_LIST_APPEND(*fx_result, lstend_0, node_0);

   _fx_catch_1: ;
      _fx_free_T2iN14K_form__kexp_t(&x_1);
      FX_CHECK_EXN(_fx_catch_2);
   }

_fx_catch_2: ;
   FX_FREE_ARR(&arr_0);

_fx_endmatch_0: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM1tNt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t* arg0,
   int_ arg1,
   int_ arg2,
   int_ arg3,
   fx_arr_t* arg4,
   fx_arr_t* arg5,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t);
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(arg0, &v->u.t.t0);
   v->u.t.t1 = arg1;
   v->u.t.t2 = arg2;
   v->u.t.t3 = arg3;
   fx_copy_arr(arg4, &v->u.t.t4);
   fx_copy_arr(arg5, &v->u.t.t5);
   return 0;
}

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM1tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t* arg0,
   int_ arg1,
   int_ arg2,
   int_ arg3,
   fx_arr_t* arg4,
   fx_arr_t* arg5,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t);
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(arg0, &v->u.t.t0);
   v->u.t.t1 = arg1;
   v->u.t.t2 = arg2;
   v->u.t.t3 = arg3;
   fx_copy_arr(arg4, &v->u.t.t4);
   fx_copy_arr(arg5, &v->u.t.t5);
   return 0;
}

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM1tNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* arg0,
   int_ arg1,
   int_ arg2,
   int_ arg3,
   fx_arr_t* arg4,
   fx_arr_t* arg5,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t);
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(arg0, &v->u.t.t0);
   v->u.t.t1 = arg1;
   v->u.t.t2 = arg2;
   v->u.t.t3 = arg3;
   fx_copy_arr(arg4, &v->u.t.t4);
   fx_copy_arr(arg5, &v->u.t.t5);
   return 0;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM5emptyNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t3iR9Ast__id_tN14K_form__atom_t(
   int_ size0_0,
   struct _fx_R9Ast__id_t* k0_0,
   struct _fx_N14K_form__atom_t* d0_0,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t entry0_0 = {0};
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   int fx_status = 0;
   int_ size_0 = 8;
   while (size_0 < size0_0) {
      size_0 = size_0 * 2;
   }
   int_ idxsize_0 = size_0 * 2;
   _fx_make_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(0ULL, k0_0, d0_0, &entry0_0);
   FX_CALL(_fx_M7HashmapFM9makeindexA1i1i(idxsize_0, &v_0, 0), _fx_cleanup);
   _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t* dstptr_0 = 0;
   int_ n_0 = size_0;
   {
      const int_ shape_0[] = { n_0 };
      FX_CALL(
         fx_make_arr(1, shape_0, sizeof(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t),
            (fx_free_t)_fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t,
            (fx_copy_t)_fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t, 0, &v_1), _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t*)v_1.data;
   for (int_ i_0 = 0; i_0 < n_0; i_0++, dstptr_0++) {
      _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(&entry0_0, dstptr_0);
   }
   FX_CALL(
      _fx_M13K_copy_n_skipFM1tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t6Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(
         &entry0_0, 0, 0, 0, &v_0, &v_1, fx_result), _fx_cleanup);

_fx_cleanup: ;
   _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tN14K_form__atom_t(&entry0_0);
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM9add_fast_i4iA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tRt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
   int_ tabsz_0,
   fx_arr_t* ht_index_0,
   fx_arr_t* ht_table_0,
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t* entry_0,
   int_* fx_result,
   void* fx_fv)
{
   fx_exn_t v_0 = {0};
   int fx_status = 0;
   int_ idxsz_0 = FX_ARR_SIZE(*ht_index_0, 0);
   uint64_t hv_0 = entry_0->hv;
   uint64_t perturb_0 = hv_0;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   bool found_free_slot_0 = false;
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, *ht_index_0, j_0);
      if (tidx_0 == 0) {
         FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
         *FX_PTR_1D(int_, *ht_index_0, j_0) = tabsz_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(*ht_table_0, 0, tabsz_0), _fx_catch_0);
         _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t* v_2 =
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t, *ht_table_0, tabsz_0);
         _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(v_2);
         _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(entry_0, v_2);
         found_free_slot_0 = true;
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (!found_free_slot_0) {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_0), _fx_cleanup);
      FX_THROW(&v_0, true, _fx_cleanup);
   }
   *fx_result = tabsz_0 + 1;

_fx_cleanup: ;
   fx_free_exn(&v_0);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM9add_fast_i4iA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tRt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   int_ tabsz_0,
   fx_arr_t* ht_index_0,
   fx_arr_t* ht_table_0,
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* entry_0,
   int_* fx_result,
   void* fx_fv)
{
   fx_exn_t v_0 = {0};
   int fx_status = 0;
   int_ idxsz_0 = FX_ARR_SIZE(*ht_index_0, 0);
   uint64_t hv_0 = entry_0->hv;
   uint64_t perturb_0 = hv_0;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   bool found_free_slot_0 = false;
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, *ht_index_0, j_0);
      if (tidx_0 == 0) {
         FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
         *FX_PTR_1D(int_, *ht_index_0, j_0) = tabsz_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(*ht_table_0, 0, tabsz_0), _fx_catch_0);
         _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* v_2 =
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, *ht_table_0, tabsz_0);
         _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(v_2);
         _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(entry_0, v_2);
         found_free_slot_0 = true;
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (!found_free_slot_0) {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_0), _fx_cleanup);
      FX_THROW(&v_0, true, _fx_cleanup);
   }
   *fx_result = tabsz_0 + 1;

_fx_cleanup: ;
   fx_free_exn(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM4growv2Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_ti(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t* self_0,
   int_ new_size_0,
   void* fx_fv)
{
   fx_arr_t ht_table_0 = {0};
   _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t v_0 = {0};
   fx_arr_t new_ht_table_0 = {0};
   fx_arr_t new_ht_index_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t5, &ht_table_0);
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(&self_0->u.t.t0, &v_0);
   _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t* dstptr_0 = 0;
   {
      const int_ shape_0[] = { new_size_0 };
      FX_CALL(
         fx_make_arr(1, shape_0, sizeof(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t),
            (fx_free_t)_fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t,
            (fx_copy_t)_fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t, 0, &new_ht_table_0), _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t*)new_ht_table_0.data;
   for (int_ i_0 = 0; i_0 < new_size_0; i_0++, dstptr_0++) {
      _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(&v_0, dstptr_0);
   }
   FX_CALL(_fx_M7HashmapFM9makeindexA1i1i(new_size_0 * 2, &new_ht_index_0, 0), _fx_cleanup);
   int_ tabsz_0 = 0;
   int_ v_1 = self_0->u.t.t2;
   for (int_ j_0 = 0; j_0 < v_1; j_0++) {
      _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t v_2 = {0};
      FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
      if (FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t, ht_table_0, j_0)->hv < 9223372036854775808ULL)
         {
         FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
         _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t, ht_table_0, j_0), &v_2);
         int_ v_3;
         FX_CALL(
            _fx_M13K_copy_n_skipFM9add_fast_i4iA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tRt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
               tabsz_0, &new_ht_index_0, &new_ht_table_0, &v_2, &v_3, 0), _fx_catch_0);
         tabsz_0 = v_3;
      }

   _fx_catch_0: ;
      _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(&v_2);
      FX_CHECK_EXN(_fx_cleanup);
   }
   fx_arr_t* v_4 = &self_0->u.t.t4;
   FX_FREE_ARR(v_4);
   fx_copy_arr(&new_ht_index_0, v_4);
   fx_arr_t* v_5 = &self_0->u.t.t5;
   FX_FREE_ARR(v_5);
   fx_copy_arr(&new_ht_table_0, v_5);
   self_0->u.t.t2 = tabsz_0;
   self_0->u.t.t3 = 0;

_fx_cleanup: ;
   FX_FREE_ARR(&ht_table_0);
   _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(&v_0);
   FX_FREE_ARR(&new_ht_table_0);
   FX_FREE_ARR(&new_ht_index_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM4growv2Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_ti(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* self_0,
   int_ new_size_0,
   void* fx_fv)
{
   fx_arr_t ht_table_0 = {0};
   _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t v_0 = {0};
   fx_arr_t new_ht_table_0 = {0};
   fx_arr_t new_ht_index_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t5, &ht_table_0);
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&self_0->u.t.t0, &v_0);
   _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* dstptr_0 = 0;
   {
      const int_ shape_0[] = { new_size_0 };
      FX_CALL(
         fx_make_arr(1, shape_0, sizeof(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t),
            (fx_free_t)_fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t,
            (fx_copy_t)_fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, 0, &new_ht_table_0),
         _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t*)new_ht_table_0.data;
   for (int_ i_0 = 0; i_0 < new_size_0; i_0++, dstptr_0++) {
      _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&v_0, dstptr_0);
   }
   FX_CALL(_fx_M7HashmapFM9makeindexA1i1i(new_size_0 * 2, &new_ht_index_0, 0), _fx_cleanup);
   int_ tabsz_0 = 0;
   int_ v_1 = self_0->u.t.t2;
   for (int_ j_0 = 0; j_0 < v_1; j_0++) {
      _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t v_2 = {0};
      FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
      if (FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, ht_table_0, j_0)->hv <
             9223372036854775808ULL) {
         FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
         _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, ht_table_0, j_0), &v_2);
         int_ v_3;
         FX_CALL(
            _fx_M13K_copy_n_skipFM9add_fast_i4iA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tRt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
               tabsz_0, &new_ht_index_0, &new_ht_table_0, &v_2, &v_3, 0), _fx_catch_0);
         tabsz_0 = v_3;
      }

   _fx_catch_0: ;
      _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&v_2);
      FX_CHECK_EXN(_fx_cleanup);
   }
   fx_arr_t* v_4 = &self_0->u.t.t4;
   FX_FREE_ARR(v_4);
   fx_copy_arr(&new_ht_index_0, v_4);
   fx_arr_t* v_5 = &self_0->u.t.t5;
   FX_FREE_ARR(v_5);
   fx_copy_arr(&new_ht_table_0, v_5);
   self_0->u.t.t2 = tabsz_0;
   self_0->u.t.t3 = 0;

_fx_cleanup: ;
   FX_FREE_ARR(&ht_table_0);
   _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&v_0);
   FX_FREE_ARR(&new_ht_table_0);
   FX_FREE_ARR(&new_ht_index_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM9find_idx_Ta2i2Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_tR9Ast__id_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   struct _fx_Ta2i* fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   int fx_status = 0;
   uint64_t __fold_result___0 = 14695981039346656037ULL;
   uint64_t h_0 = __fold_result___0 ^ ((uint64_t)k_0->m ^ 14695981039346656037ULL);
   __fold_result___0 = h_0 * 1099511628211ULL;
   uint64_t h_1 = __fold_result___0 ^ ((uint64_t)k_0->i ^ 14695981039346656037ULL);
   __fold_result___0 = h_1 * 1099511628211ULL;
   uint64_t h_2 = __fold_result___0 ^ ((uint64_t)k_0->j ^ 14695981039346656037ULL);
   __fold_result___0 = h_2 * 1099511628211ULL;
   uint64_t hv_0 = __fold_result___0 & 9223372036854775807ULL;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t entry_0 = {0};
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_2 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_2), _fx_catch_0);
         _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t, self_0->u.t.t5, v_2), &entry_0);
         bool t_0;
         if (entry_0.hv == hv_0) {
            _fx_R9Ast__id_t v_3 = entry_0.key;
            bool __fold_result___1 = true;
            bool t_1;
            if (v_3.m == k_0->m) {
               t_1 = __fold_result___1;
            }
            else {
               t_1 = false;
            }
            __fold_result___1 = t_1;
            bool t_2;
            if (v_3.i == k_0->i) {
               t_2 = __fold_result___1;
            }
            else {
               t_2 = false;
            }
            __fold_result___1 = t_2;
            bool t_3;
            if (v_3.j == k_0->j) {
               t_3 = __fold_result___1;
            }
            else {
               t_3 = false;
            }
            __fold_result___1 = t_3;
            t_0 = __fold_result___1;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(&entry_0);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_Ta2i tup_0 = { j_0, found_0 };
   *fx_result = tup_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM9find_idx_Ta2i2Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tR9Ast__id_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   struct _fx_Ta2i* fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   int fx_status = 0;
   uint64_t __fold_result___0 = 14695981039346656037ULL;
   uint64_t h_0 = __fold_result___0 ^ ((uint64_t)k_0->m ^ 14695981039346656037ULL);
   __fold_result___0 = h_0 * 1099511628211ULL;
   uint64_t h_1 = __fold_result___0 ^ ((uint64_t)k_0->i ^ 14695981039346656037ULL);
   __fold_result___0 = h_1 * 1099511628211ULL;
   uint64_t h_2 = __fold_result___0 ^ ((uint64_t)k_0->j ^ 14695981039346656037ULL);
   __fold_result___0 = h_2 * 1099511628211ULL;
   uint64_t hv_0 = __fold_result___0 & 9223372036854775807ULL;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t entry_0 = {0};
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_2 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_2), _fx_catch_0);
         _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, self_0->u.t.t5, v_2), &entry_0);
         bool t_0;
         if (entry_0.hv == hv_0) {
            _fx_R9Ast__id_t v_3 = entry_0.key;
            bool __fold_result___1 = true;
            bool t_1;
            if (v_3.m == k_0->m) {
               t_1 = __fold_result___1;
            }
            else {
               t_1 = false;
            }
            __fold_result___1 = t_1;
            bool t_2;
            if (v_3.i == k_0->i) {
               t_2 = __fold_result___1;
            }
            else {
               t_2 = false;
            }
            __fold_result___1 = t_2;
            bool t_3;
            if (v_3.j == k_0->j) {
               t_3 = __fold_result___1;
            }
            else {
               t_3 = false;
            }
            __fold_result___1 = t_3;
            t_0 = __fold_result___1;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&entry_0);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_Ta2i tup_0 = { j_0, found_0 };
   *fx_result = tup_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM18find_idx_or_inserti2Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_tR9Ast__id_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   int_* fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   _fx_T2iN14K_form__kexp_t v_2 = {0};
   _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t v_3 = {0};
   fx_exn_t v_4 = {0};
   int fx_status = 0;
   uint64_t __fold_result___0 = 14695981039346656037ULL;
   uint64_t h_0 = __fold_result___0 ^ ((uint64_t)k_0->m ^ 14695981039346656037ULL);
   __fold_result___0 = h_0 * 1099511628211ULL;
   uint64_t h_1 = __fold_result___0 ^ ((uint64_t)k_0->i ^ 14695981039346656037ULL);
   __fold_result___0 = h_1 * 1099511628211ULL;
   uint64_t h_2 = __fold_result___0 ^ ((uint64_t)k_0->j ^ 14695981039346656037ULL);
   __fold_result___0 = h_2 * 1099511628211ULL;
   uint64_t hv_0 = __fold_result___0 & 9223372036854775807ULL;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   if (self_0->u.t.t1 + 1 > idxsz_0 >> 1) {
      while (idxsz_0 < (self_0->u.t.t1 + 1) * 2) {
         idxsz_0 = idxsz_0 * 2;
      }
      FX_CALL(
         _fx_M13K_copy_n_skipFM4growv2Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_ti(self_0,
            fx_maxi(idxsz_0 / 2, self_0->u.t.t1 + 1), 0), _fx_cleanup);
   }
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ insert_idx_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_5 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_5; i_0++) {
      _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t entry_0 = {0};
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_6 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_6), _fx_catch_0);
         _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t, self_0->u.t.t5, v_6), &entry_0);
         bool t_0;
         if (entry_0.hv == hv_0) {
            _fx_R9Ast__id_t v_7 = entry_0.key;
            bool __fold_result___1 = true;
            bool t_1;
            if (v_7.m == k_0->m) {
               t_1 = __fold_result___1;
            }
            else {
               t_1 = false;
            }
            __fold_result___1 = t_1;
            bool t_2;
            if (v_7.i == k_0->i) {
               t_2 = __fold_result___1;
            }
            else {
               t_2 = false;
            }
            __fold_result___1 = t_2;
            bool t_3;
            if (v_7.j == k_0->j) {
               t_3 = __fold_result___1;
            }
            else {
               t_3 = false;
            }
            __fold_result___1 = t_3;
            t_0 = __fold_result___1;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         if (insert_idx_0 < 0) {
            insert_idx_0 = j_0;
         }
         FX_BREAK(_fx_catch_0);
      }
      else {
         bool t_4;
         if (tidx_0 == 1) {
            t_4 = insert_idx_0 < 0;
         }
         else {
            t_4 = false;
         }
         if (t_4) {
            insert_idx_0 = j_0;
         }
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(&entry_0);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (found_0 >= 0) {
      bool t_5;
      if (insert_idx_0 >= 0) {
         t_5 = insert_idx_0 != j_0;
      }
      else {
         t_5 = false;
      }
      if (t_5) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, j_0) = 1;
      }
   }
   else if (insert_idx_0 >= 0) {
      found_0 = self_0->u.t.t3 - 1;
      if (found_0 >= 0) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
         self_0->u.t.t3 =
            (int_)
               (FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t, self_0->u.t.t5, found_0)->hv &
                  9223372036854775807ULL);
      }
      else {
         found_0 = self_0->u.t.t2;
         self_0->u.t.t2 = self_0->u.t.t2 + 1;
         fx_copy_arr(&self_0->u.t.t5, &v_1);
         FX_CALL(_fx_F6assertv1B(found_0 < FX_ARR_SIZE(v_1, 0), 0), _fx_cleanup);
      }
      _fx_copy_T2iN14K_form__kexp_t(&self_0->u.t.t0.data, &v_2);
      _fx_make_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(hv_0, k_0, &v_2, &v_3);
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
      _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t* v_8 =
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t, self_0->u.t.t5, found_0);
      _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(v_8);
      _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(&v_3, v_8);
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
      *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
      self_0->u.t.t1 = self_0->u.t.t1 + 1;
   }
   else {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_4), _fx_cleanup);
      FX_THROW(&v_4, true, _fx_cleanup);
   }
   *fx_result = found_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   _fx_free_T2iN14K_form__kexp_t(&v_2);
   _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(&v_3);
   fx_free_exn(&v_4);
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM18find_idx_or_inserti2Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tR9Ast__id_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   int_* fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   _fx_Nt10Hashset__t1R9Ast__id_t v_2 = 0;
   _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t v_3 = {0};
   fx_exn_t v_4 = {0};
   int fx_status = 0;
   uint64_t __fold_result___0 = 14695981039346656037ULL;
   uint64_t h_0 = __fold_result___0 ^ ((uint64_t)k_0->m ^ 14695981039346656037ULL);
   __fold_result___0 = h_0 * 1099511628211ULL;
   uint64_t h_1 = __fold_result___0 ^ ((uint64_t)k_0->i ^ 14695981039346656037ULL);
   __fold_result___0 = h_1 * 1099511628211ULL;
   uint64_t h_2 = __fold_result___0 ^ ((uint64_t)k_0->j ^ 14695981039346656037ULL);
   __fold_result___0 = h_2 * 1099511628211ULL;
   uint64_t hv_0 = __fold_result___0 & 9223372036854775807ULL;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   if (self_0->u.t.t1 + 1 > idxsz_0 >> 1) {
      while (idxsz_0 < (self_0->u.t.t1 + 1) * 2) {
         idxsz_0 = idxsz_0 * 2;
      }
      FX_CALL(
         _fx_M13K_copy_n_skipFM4growv2Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_ti(self_0,
            fx_maxi(idxsz_0 / 2, self_0->u.t.t1 + 1), 0), _fx_cleanup);
   }
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ insert_idx_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_5 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_5; i_0++) {
      _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t entry_0 = {0};
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_6 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_6), _fx_catch_0);
         _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, self_0->u.t.t5, v_6), &entry_0);
         bool t_0;
         if (entry_0.hv == hv_0) {
            _fx_R9Ast__id_t v_7 = entry_0.key;
            bool __fold_result___1 = true;
            bool t_1;
            if (v_7.m == k_0->m) {
               t_1 = __fold_result___1;
            }
            else {
               t_1 = false;
            }
            __fold_result___1 = t_1;
            bool t_2;
            if (v_7.i == k_0->i) {
               t_2 = __fold_result___1;
            }
            else {
               t_2 = false;
            }
            __fold_result___1 = t_2;
            bool t_3;
            if (v_7.j == k_0->j) {
               t_3 = __fold_result___1;
            }
            else {
               t_3 = false;
            }
            __fold_result___1 = t_3;
            t_0 = __fold_result___1;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         if (insert_idx_0 < 0) {
            insert_idx_0 = j_0;
         }
         FX_BREAK(_fx_catch_0);
      }
      else {
         bool t_4;
         if (tidx_0 == 1) {
            t_4 = insert_idx_0 < 0;
         }
         else {
            t_4 = false;
         }
         if (t_4) {
            insert_idx_0 = j_0;
         }
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&entry_0);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (found_0 >= 0) {
      bool t_5;
      if (insert_idx_0 >= 0) {
         t_5 = insert_idx_0 != j_0;
      }
      else {
         t_5 = false;
      }
      if (t_5) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, j_0) = 1;
      }
   }
   else if (insert_idx_0 >= 0) {
      found_0 = self_0->u.t.t3 - 1;
      if (found_0 >= 0) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
         self_0->u.t.t3 =
            (int_)
               (FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, self_0->u.t.t5, found_0)->hv &
                  9223372036854775807ULL);
      }
      else {
         found_0 = self_0->u.t.t2;
         self_0->u.t.t2 = self_0->u.t.t2 + 1;
         fx_copy_arr(&self_0->u.t.t5, &v_1);
         FX_CALL(_fx_F6assertv1B(found_0 < FX_ARR_SIZE(v_1, 0), 0), _fx_cleanup);
      }
      FX_COPY_PTR(self_0->u.t.t0.data, &v_2);
      _fx_make_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(hv_0, k_0, v_2, &v_3);
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
      _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* v_8 =
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, self_0->u.t.t5, found_0);
      _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(v_8);
      _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&v_3, v_8);
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
      *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
      self_0->u.t.t1 = self_0->u.t.t1 + 1;
   }
   else {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_4), _fx_cleanup);
      FX_THROW(&v_4, true, _fx_cleanup);
   }
   *fx_result = found_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   if (v_2) {
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&v_2);
   }
   _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&v_3);
   fx_free_exn(&v_4);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM3addv3Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tR9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* d_0,
   void* fx_fv)
{
   int fx_status = 0;
   int_ idx_0;
   FX_CALL(
      _fx_M13K_copy_n_skipFM18find_idx_or_inserti2Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tR9Ast__id_t(self_0, k_0,
         &idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, idx_0), _fx_cleanup);
   _fx_Nt10Hashset__t1R9Ast__id_t* v_0 =
      &FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, self_0->u.t.t5, idx_0)->data;
   _fx_free_Nt10Hashset__t1R9Ast__id_t(v_0);
   FX_COPY_PTR(d_0, v_0);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM8add_listv2Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_tLT2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t* self_0,
   struct _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t_data_t* data_0,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   int fx_status = 0;
   int_ v_1 = _fx_M13K_copy_n_skipFM6lengthi1LT2R9Ast__id_tT2iN14K_form__kexp_t(data_0, 0);
   int_ datasz_0 = self_0->u.t.t1 + v_1;
   fx_copy_arr(&self_0->u.t.t5, &v_0);
   int_ curr_size_0 = FX_ARR_SIZE(v_0, 0);
   int_ new_size_0 = curr_size_0;
   while (new_size_0 < datasz_0) {
      new_size_0 = new_size_0 * 2;
   }
   if (new_size_0 > curr_size_0) {
      FX_CALL(_fx_M13K_copy_n_skipFM4growv2Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_ti(self_0, new_size_0, 0), _fx_cleanup);
   }
   _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t lst_0 = data_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_T2iN14K_form__kexp_t d_0 = {0};
      _fx_T2R9Ast__id_tT2iN14K_form__kexp_t* __pat___0 = &lst_0->hd;
      _fx_R9Ast__id_t k_0 = __pat___0->t0;
      _fx_copy_T2iN14K_form__kexp_t(&__pat___0->t1, &d_0);
      int_ idx_0;
      FX_CALL(
         _fx_M13K_copy_n_skipFM18find_idx_or_inserti2Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_tR9Ast__id_t(self_0, &k_0,
            &idx_0, 0), _fx_catch_0);
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, idx_0), _fx_catch_0);
      _fx_T2iN14K_form__kexp_t* v_2 =
         &FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t, self_0->u.t.t5, idx_0)->data;
      _fx_free_T2iN14K_form__kexp_t(v_2);
      _fx_copy_T2iN14K_form__kexp_t(&d_0, v_2);

   _fx_catch_0: ;
      _fx_free_T2iN14K_form__kexp_t(&d_0);
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM1tNt10Hashset__t1R9Ast__id_t6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(
   struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* arg0,
   int_ arg1,
   int_ arg2,
   int_ arg3,
   fx_arr_t* arg4,
   fx_arr_t* arg5,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt10Hashset__t1R9Ast__id_t);
   v->u.t.t0 = *arg0;
   v->u.t.t1 = arg1;
   v->u.t.t2 = arg2;
   v->u.t.t3 = arg3;
   fx_copy_arr(arg4, &v->u.t.t4);
   fx_copy_arr(arg5, &v->u.t.t5);
   return 0;
}

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM9add_fast_i4iA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_tRt24Hashset__hashset_entry_t1R9Ast__id_t(
   int_ tabsz_0,
   fx_arr_t* ht_index_0,
   fx_arr_t* ht_table_0,
   struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* entry_0,
   int_* fx_result,
   void* fx_fv)
{
   fx_exn_t v_0 = {0};
   int fx_status = 0;
   int_ idxsz_0 = FX_ARR_SIZE(*ht_index_0, 0);
   uint64_t hv_0 = entry_0->hv;
   uint64_t perturb_0 = hv_0;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   bool found_free_slot_0 = false;
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, *ht_index_0, j_0);
      if (tidx_0 == 0) {
         FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
         *FX_PTR_1D(int_, *ht_index_0, j_0) = tabsz_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(*ht_table_0, 0, tabsz_0), _fx_catch_0);
         *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, *ht_table_0, tabsz_0) = *entry_0;
         found_free_slot_0 = true;
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (!found_free_slot_0) {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_0), _fx_cleanup);
      FX_THROW(&v_0, true, _fx_cleanup);
   }
   *fx_result = tabsz_0 + 1;

_fx_cleanup: ;
   fx_free_exn(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM4growv2Nt10Hashset__t1R9Ast__id_ti(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   int_ new_size_0,
   void* fx_fv)
{
   fx_arr_t ht_table_0 = {0};
   fx_arr_t new_ht_table_0 = {0};
   fx_arr_t new_ht_index_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t5, &ht_table_0);
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t v_0 = self_0->u.t.t0;
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* dstptr_0 = 0;
   {
      const int_ shape_0[] = { new_size_0 };
      FX_CALL(fx_make_arr(1, shape_0, sizeof(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t), 0, 0, 0, &new_ht_table_0),
         _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t*)new_ht_table_0.data;
   for (int_ i_0 = 0; i_0 < new_size_0; i_0++, dstptr_0++) {
      *dstptr_0 = v_0;
   }
   FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(new_size_0 * 2, &new_ht_index_0, 0), _fx_cleanup);
   int_ tabsz_0 = 0;
   int_ v_1 = self_0->u.t.t2;
   for (int_ j_0 = 0; j_0 < v_1; j_0++) {
      FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
      if (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, ht_table_0, j_0)->hv < 9223372036854775808ULL) {
         FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
         _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t v_2 =
            *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, ht_table_0, j_0);
         int_ v_3;
         FX_CALL(
            _fx_M13K_copy_n_skipFM9add_fast_i4iA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_tRt24Hashset__hashset_entry_t1R9Ast__id_t(
               tabsz_0, &new_ht_index_0, &new_ht_table_0, &v_2, &v_3, 0), _fx_catch_0);
         tabsz_0 = v_3;
      }

   _fx_catch_0: ;
      FX_CHECK_EXN(_fx_cleanup);
   }
   fx_arr_t* v_4 = &self_0->u.t.t4;
   FX_FREE_ARR(v_4);
   fx_copy_arr(&new_ht_index_0, v_4);
   fx_arr_t* v_5 = &self_0->u.t.t5;
   FX_FREE_ARR(v_5);
   fx_copy_arr(&new_ht_table_0, v_5);
   self_0->u.t.t2 = tabsz_0;
   self_0->u.t.t3 = 0;

_fx_cleanup: ;
   FX_FREE_ARR(&ht_table_0);
   FX_FREE_ARR(&new_ht_table_0);
   FX_FREE_ARR(&new_ht_index_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM9find_idx_Ta2i3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   uint64_t hv_0,
   struct _fx_Ta2i* fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_2 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_2), _fx_catch_0);
         _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t entry_0 =
            *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, self_0->u.t.t5, v_2);
         bool t_0;
         if (entry_0.hv == hv_0) {
            _fx_R9Ast__id_t v_3 = entry_0.key;
            bool __fold_result___0 = true;
            bool t_1;
            if (v_3.m == k_0->m) {
               t_1 = __fold_result___0;
            }
            else {
               t_1 = false;
            }
            __fold_result___0 = t_1;
            bool t_2;
            if (v_3.i == k_0->i) {
               t_2 = __fold_result___0;
            }
            else {
               t_2 = false;
            }
            __fold_result___0 = t_2;
            bool t_3;
            if (v_3.j == k_0->j) {
               t_3 = __fold_result___0;
            }
            else {
               t_3 = false;
            }
            __fold_result___0 = t_3;
            t_0 = __fold_result___0;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_Ta2i tup_0 = { j_0, found_0 };
   *fx_result = tup_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   uint64_t hv_0,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   fx_exn_t v_2 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   if (self_0->u.t.t1 + 1 > idxsz_0 >> 1) {
      while (idxsz_0 < (self_0->u.t.t1 + 1) * 2) {
         idxsz_0 = idxsz_0 * 2;
      }
      FX_CALL(_fx_M13K_copy_n_skipFM4growv2Nt10Hashset__t1R9Ast__id_ti(self_0, fx_maxi(idxsz_0 / 2, self_0->u.t.t1 + 1), 0),
         _fx_cleanup);
   }
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ insert_idx_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_3 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_3; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_4 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_4), _fx_catch_0);
         _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t entry_0 =
            *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, self_0->u.t.t5, v_4);
         bool t_0;
         if (entry_0.hv == hv_0) {
            _fx_R9Ast__id_t v_5 = entry_0.key;
            bool __fold_result___0 = true;
            bool t_1;
            if (v_5.m == k_0->m) {
               t_1 = __fold_result___0;
            }
            else {
               t_1 = false;
            }
            __fold_result___0 = t_1;
            bool t_2;
            if (v_5.i == k_0->i) {
               t_2 = __fold_result___0;
            }
            else {
               t_2 = false;
            }
            __fold_result___0 = t_2;
            bool t_3;
            if (v_5.j == k_0->j) {
               t_3 = __fold_result___0;
            }
            else {
               t_3 = false;
            }
            __fold_result___0 = t_3;
            t_0 = __fold_result___0;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         if (insert_idx_0 < 0) {
            insert_idx_0 = j_0;
         }
         FX_BREAK(_fx_catch_0);
      }
      else {
         bool t_4;
         if (tidx_0 == 1) {
            t_4 = insert_idx_0 < 0;
         }
         else {
            t_4 = false;
         }
         if (t_4) {
            insert_idx_0 = j_0;
         }
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (found_0 >= 0) {
      bool t_5;
      if (insert_idx_0 >= 0) {
         t_5 = insert_idx_0 != j_0;
      }
      else {
         t_5 = false;
      }
      if (t_5) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, j_0) = 1;
      }
   }
   else if (insert_idx_0 >= 0) {
      found_0 = self_0->u.t.t3 - 1;
      if (found_0 >= 0) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
         self_0->u.t.t3 =
            (int_)
               (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, self_0->u.t.t5, found_0)->hv & 9223372036854775807ULL);
      }
      else {
         found_0 = self_0->u.t.t2;
         self_0->u.t.t2 = self_0->u.t.t2 + 1;
         fx_copy_arr(&self_0->u.t.t5, &v_1);
         FX_CALL(_fx_F6assertv1B(found_0 < FX_ARR_SIZE(v_1, 0), 0), _fx_cleanup);
      }
      _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t v_6 = { hv_0, *k_0 };
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
      *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, self_0->u.t.t5, found_0) = v_6;
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
      *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
      self_0->u.t.t1 = self_0->u.t.t1 + 1;
   }
   else {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_2), _fx_cleanup);
      FX_THROW(&v_2, true, _fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   fx_free_exn(&v_2);
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM3addv2Nt10Hashset__t1R9Ast__id_tR9Ast__id_t(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   void* fx_fv)
{
   int fx_status = 0;
   uint64_t __fold_result___0 = 14695981039346656037ULL;
   uint64_t h_0 = __fold_result___0 ^ ((uint64_t)k_0->m ^ 14695981039346656037ULL);
   __fold_result___0 = h_0 * 1099511628211ULL;
   uint64_t h_1 = __fold_result___0 ^ ((uint64_t)k_0->i ^ 14695981039346656037ULL);
   __fold_result___0 = h_1 * 1099511628211ULL;
   uint64_t h_2 = __fold_result___0 ^ ((uint64_t)k_0->j ^ 14695981039346656037ULL);
   __fold_result___0 = h_2 * 1099511628211ULL;
   FX_CALL(
      _fx_M13K_copy_n_skipFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(self_0, k_0,
         __fold_result___0 & 9223372036854775807ULL, 0), _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM3appv2Nt10Hashset__t1R9Ast__id_tFPv1R9Ast__id_t(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_FPv1R9Ast__id_t* f_0,
   void* fx_fv)
{
   fx_arr_t table_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t5, &table_0);
   int_ v_0 = self_0->u.t.t2;
   for (int_ j_0 = 0; j_0 < v_0; j_0++) {
      FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_0);
      if (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->hv < 9223372036854775808ULL) {
         FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_0);
         _fx_R9Ast__id_t v_1 = FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->key;
         FX_CALL(f_0->fp(&v_1, f_0->fcv), _fx_catch_0);
      }

   _fx_catch_0: ;
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_ARR(&table_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM9intersectv2Nt10Hashset__t1R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* b_0,
   void* fx_fv)
{
   fx_arr_t table_0 = {0};
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   fx_arr_t v_2 = {0};
   fx_arr_t v_3 = {0};
   _fx_Nt10Hashset__t1R9Ast__id_t tmp_0 = 0;
   fx_arr_t v_4 = {0};
   fx_arr_t v_5 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t5, &table_0);
   int_ tabsz_0 = self_0->u.t.t2;
   fx_copy_arr(&self_0->u.t.t5, &v_0);
   fx_copy_arr(&b_0->u.t.t5, &v_1);
   _fx_R9Ast__id_t v_6 = self_0->u.t.t0.key;
   int_ size_0 = 8;
   while (size_0 < fx_mini(FX_ARR_SIZE(v_0, 0), FX_ARR_SIZE(v_1, 0))) {
      size_0 = size_0 * 2;
   }
   int_ idxsize_0 = size_0 * 2;
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t entry0_0 = { 0ULL, v_6 };
   FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(idxsize_0, &v_2, 0), _fx_cleanup);
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* dstptr_0 = 0;
   int_ n_0 = size_0;
   {
      const int_ shape_0[] = { n_0 };
      FX_CALL(fx_make_arr(1, shape_0, sizeof(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t), 0, 0, 0, &v_3), _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t*)v_3.data;
   for (int_ i_0 = 0; i_0 < n_0; i_0++, dstptr_0++) {
      *dstptr_0 = entry0_0;
   }
   FX_CALL(
      _fx_M13K_copy_n_skipFM1tNt10Hashset__t1R9Ast__id_t6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(
         &entry0_0, 0, 0, 0, &v_2, &v_3, &tmp_0), _fx_cleanup);
   fx_copy_arr(&tmp_0->u.t.t5, &v_4);
   fx_arr_t* v_7 = &self_0->u.t.t5;
   FX_FREE_ARR(v_7);
   fx_copy_arr(&v_4, v_7);
   fx_copy_arr(&tmp_0->u.t.t4, &v_5);
   fx_arr_t* v_8 = &self_0->u.t.t4;
   FX_FREE_ARR(v_8);
   fx_copy_arr(&v_5, v_8);
   self_0->u.t.t1 = 0;
   self_0->u.t.t2 = 0;
   self_0->u.t.t3 = 0;
   for (int_ j_0 = 0; j_0 < tabsz_0; j_0++) {
      FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_0);
      bool v_9;
      if (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->hv < 9223372036854775808ULL) {
         FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_0);
         _fx_R9Ast__id_t v_10 = FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->key;
         FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_0);
         _fx_Ta2i v_11;
         FX_CALL(
            _fx_M13K_copy_n_skipFM9find_idx_Ta2i3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(b_0, &v_10,
               FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->hv, &v_11, 0), _fx_catch_0);
         v_9 = v_11.t1 >= 0;
      }
      else {
         v_9 = false;
      }
      if (v_9) {
         FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_0);
         _fx_R9Ast__id_t v_12 = FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->key;
         FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_0);
         FX_CALL(
            _fx_M13K_copy_n_skipFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(self_0, &v_12,
               FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->hv, 0), _fx_catch_0);
      }

   _fx_catch_0: ;
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_ARR(&table_0);
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   FX_FREE_ARR(&v_2);
   FX_FREE_ARR(&v_3);
   if (tmp_0) {
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&tmp_0);
   }
   FX_FREE_ARR(&v_4);
   FX_FREE_ARR(&v_5);
   return fx_status;
}

FX_EXTERN_C int _fx_M13K_copy_n_skipFM9copy_someLR17K_form__kmodule_t1LR17K_form__kmodule_t(
   struct _fx_LR17K_form__kmodule_t_data_t* kmods_0,
   struct _fx_LR17K_form__kmodule_t_data_t** fx_result,
   void* fx_fv)
{
   fx_arr_t toposort_idx_0 = {0};
   _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t all_copied_0 = 0;
   _fx_N14K_form__kexp_t v_0 = 0;
   _fx_T2iN14K_form__kexp_t v_1 = {0};
   _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t entry0_0 = {0};
   fx_arr_t v_2 = {0};
   fx_arr_t v_3 = {0};
   _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t ht_0 = 0;
   _fx_Nt10Hashset__t1R9Ast__id_t all_copied_set_0 = 0;
   _fx_Nt10Hashset__t1R9Ast__id_t idset0_0 = 0;
   _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t entry0_1 = {0};
   fx_arr_t v_4 = {0};
   fx_arr_t v_5 = {0};
   _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t all_deps_arg_0 = 0;
   _fx_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t all_deps_ref_0 = 0;
   _fx_LR9Ast__id_t v_6 = 0;
   _fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t all_copied_code_0 = 0;
   int fx_status = 0;
   int_* dstptr_0 = 0;
   int_ v_7 = FX_ARR_SIZE(_fx_g16Ast__all_modules, 0);
   {
      const int_ shape_0[] = { v_7 };
      FX_CALL(fx_make_arr(1, shape_0, sizeof(int_), 0, 0, 0, &toposort_idx_0), _fx_cleanup);
   }
   dstptr_0 = (int_*)toposort_idx_0.data;
   for (int_ i_0 = 0; i_0 < v_7; i_0++, dstptr_0++) {
      *dstptr_0 = 123456789;
   }
   _fx_LR17K_form__kmodule_t lst_0 = kmods_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_R17K_form__kmodule_t* __pat___0 = &lst_0->hd;
      int_ km_idx_0 = __pat___0->km_idx;
      FX_CHKIDX(FX_CHKIDX1(toposort_idx_0, 0, km_idx_0), _fx_catch_0);
      *FX_PTR_1D(int_, toposort_idx_0, km_idx_0) = __pat___0->km_toposort_idx;

   _fx_catch_0: ;
      FX_CHECK_EXN(_fx_cleanup);
   }
   int_ idx_0 = 0;
   _fx_LR17K_form__kmodule_t lst_1 = kmods_0;
   for (; lst_1; lst_1 = lst_1->tl) {
      _fx_LN14K_form__kexp_t km_top_0 = 0;
      _fx_R17K_form__kmodule_t* km_0 = &lst_1->hd;
      FX_COPY_PTR(km_0->km_top, &km_top_0);
      _fx_LN14K_form__kexp_t lst_2 = km_top_0;
      for (; lst_2; lst_2 = lst_2->tl) {
         _fx_R17K_form__kdeffun_t v_8 = {0};
         _fx_N14K_form__kexp_t e_0 = lst_2->hd;
         int tag_0 = FX_REC_VARIANT_TAG(e_0);
         if (tag_0 == 32) {
            _fx_copy_R17K_form__kdeffun_t(&e_0->u.KDefFun->data, &v_8);
            _fx_R16Ast__fun_flags_t* kf_flags_0 = &v_8.kf_flags;
            bool t_0;
            if (kf_flags_0->fun_flag_instance) {
               t_0 = true;
            }
            else {
               t_0 = kf_flags_0->fun_flag_inline;
            }
            if (t_0) {
               _fx_T2iN14K_form__kexp_t v_9 = {0};
               _fx_T2R9Ast__id_tT2iN14K_form__kexp_t v_10 = {0};
               _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t v_11 = 0;
               _fx_make_T2iN14K_form__kexp_t(idx_0, e_0, &v_9);
               _fx_make_T2R9Ast__id_tT2iN14K_form__kexp_t(&v_8.kf_name, &v_9, &v_10);
               FX_CALL(_fx_cons_LT2R9Ast__id_tT2iN14K_form__kexp_t(&v_10, all_copied_0, true, &v_11), _fx_catch_1);
               _fx_free_LT2R9Ast__id_tT2iN14K_form__kexp_t(&all_copied_0);
               FX_COPY_PTR(v_11, &all_copied_0);
               idx_0 = idx_0 + 1;

            _fx_catch_1: ;
               if (v_11) {
                  _fx_free_LT2R9Ast__id_tT2iN14K_form__kexp_t(&v_11);
               }
               _fx_free_T2R9Ast__id_tT2iN14K_form__kexp_t(&v_10);
               _fx_free_T2iN14K_form__kexp_t(&v_9);
               goto _fx_endmatch_0;
            }
         }
         if (tag_0 == 36) {
            _fx_R17K_form__kdeftyp_t v_12 = {0};
            _fx_T2iN14K_form__kexp_t v_13 = {0};
            _fx_T2R9Ast__id_tT2iN14K_form__kexp_t v_14 = {0};
            _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t v_15 = 0;
            _fx_copy_R17K_form__kdeftyp_t(&e_0->u.KDefTyp->data, &v_12);
            _fx_make_T2iN14K_form__kexp_t(idx_0, e_0, &v_13);
            _fx_make_T2R9Ast__id_tT2iN14K_form__kexp_t(&v_12.kt_name, &v_13, &v_14);
            FX_CALL(_fx_cons_LT2R9Ast__id_tT2iN14K_form__kexp_t(&v_14, all_copied_0, true, &v_15), _fx_catch_2);
            _fx_free_LT2R9Ast__id_tT2iN14K_form__kexp_t(&all_copied_0);
            FX_COPY_PTR(v_15, &all_copied_0);
            idx_0 = idx_0 + 1;

         _fx_catch_2: ;
            if (v_15) {
               _fx_free_LT2R9Ast__id_tT2iN14K_form__kexp_t(&v_15);
            }
            _fx_free_T2R9Ast__id_tT2iN14K_form__kexp_t(&v_14);
            _fx_free_T2iN14K_form__kexp_t(&v_13);
            _fx_free_R17K_form__kdeftyp_t(&v_12);
            goto _fx_endmatch_0;
         }
         if (tag_0 == 34) {
            _fx_R21K_form__kdefvariant_t v_16 = {0};
            _fx_T2iN14K_form__kexp_t v_17 = {0};
            _fx_T2R9Ast__id_tT2iN14K_form__kexp_t v_18 = {0};
            _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t v_19 = 0;
            _fx_copy_R21K_form__kdefvariant_t(&e_0->u.KDefVariant->data, &v_16);
            _fx_make_T2iN14K_form__kexp_t(idx_0, e_0, &v_17);
            _fx_make_T2R9Ast__id_tT2iN14K_form__kexp_t(&v_16.kvar_name, &v_17, &v_18);
            FX_CALL(_fx_cons_LT2R9Ast__id_tT2iN14K_form__kexp_t(&v_18, all_copied_0, true, &v_19), _fx_catch_3);
            _fx_free_LT2R9Ast__id_tT2iN14K_form__kexp_t(&all_copied_0);
            FX_COPY_PTR(v_19, &all_copied_0);
            idx_0 = idx_0 + 1;

         _fx_catch_3: ;
            if (v_19) {
               _fx_free_LT2R9Ast__id_tT2iN14K_form__kexp_t(&v_19);
            }
            _fx_free_T2R9Ast__id_tT2iN14K_form__kexp_t(&v_18);
            _fx_free_T2iN14K_form__kexp_t(&v_17);
            _fx_free_R21K_form__kdefvariant_t(&v_16);
            goto _fx_endmatch_0;
         }
         if (tag_0 == 31) {
            _fx_R17K_form__kdefval_t kv_0 = {0};
            _fx_T2iN14K_form__kexp_t v_20 = {0};
            _fx_T2R9Ast__id_tT2iN14K_form__kexp_t v_21 = {0};
            _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t v_22 = 0;
            _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* vcase_0 = &e_0->u.KDefVal;
            _fx_R9Ast__id_t* n_0 = &vcase_0->t0;
            FX_CALL(_fx_M6K_formFM8get_kvalRM9kdefval_t2R9Ast__id_tR10Ast__loc_t(n_0, &vcase_0->t2, &kv_0, 0), _fx_catch_4);
            bool t_1;
            if (kv_0.kv_flags.val_flag_instance) {
               t_1 = true;
            }
            else {
               t_1 = kv_0.kv_flags.val_flag_ctor > 0;
            }
            if (t_1) {
               _fx_make_T2iN14K_form__kexp_t(idx_0, e_0, &v_20);
               _fx_make_T2R9Ast__id_tT2iN14K_form__kexp_t(n_0, &v_20, &v_21);
               FX_CALL(_fx_cons_LT2R9Ast__id_tT2iN14K_form__kexp_t(&v_21, all_copied_0, true, &v_22), _fx_catch_4);
               _fx_free_LT2R9Ast__id_tT2iN14K_form__kexp_t(&all_copied_0);
               FX_COPY_PTR(v_22, &all_copied_0);
               idx_0 = idx_0 + 1;
            }

         _fx_catch_4: ;
            if (v_22) {
               _fx_free_LT2R9Ast__id_tT2iN14K_form__kexp_t(&v_22);
            }
            _fx_free_T2R9Ast__id_tT2iN14K_form__kexp_t(&v_21);
            _fx_free_T2iN14K_form__kexp_t(&v_20);
            _fx_free_R17K_form__kdefval_t(&kv_0);
            goto _fx_endmatch_0;
         }

      _fx_endmatch_0: ;
         FX_CHECK_EXN(_fx_catch_5);

      _fx_catch_5: ;
         _fx_free_R17K_form__kdeffun_t(&v_8);
         FX_CHECK_EXN(_fx_catch_6);
      }

   _fx_catch_6: ;
      if (km_top_0) {
         _fx_free_LN14K_form__kexp_t(&km_top_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_CALL(_fx_M6K_formFM7KExpNopN14K_form__kexp_t1R10Ast__loc_t(&_fx_g10Ast__noloc, &v_0), _fx_cleanup);
   _fx_make_T2iN14K_form__kexp_t(0, v_0, &v_1);
   int_ v_23 = _fx_M13K_copy_n_skipFM6lengthi1LT2R9Ast__id_tT2iN14K_form__kexp_t(all_copied_0, 0);
   int_ size_0 = 8;
   while (size_0 < v_23) {
      size_0 = size_0 * 2;
   }
   int_ idxsize_0 = size_0 * 2;
   _fx_make_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(0ULL, &_fx_g9Ast__noid, &v_1, &entry0_0);
   FX_CALL(_fx_M7HashmapFM9makeindexA1i1i(idxsize_0, &v_2, 0), _fx_cleanup);
   _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t* dstptr_1 = 0;
   int_ n_1 = size_0;
   {
      const int_ shape_1[] = { n_1 };
      FX_CALL(
         fx_make_arr(1, shape_1, sizeof(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t),
            (fx_free_t)_fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t,
            (fx_copy_t)_fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t, 0, &v_3), _fx_cleanup);
   }
   dstptr_1 = (_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t*)v_3.data;
   for (int_ i_1 = 0; i_1 < n_1; i_1++, dstptr_1++) {
      _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(&entry0_0, dstptr_1);
   }
   FX_CALL(
      _fx_M13K_copy_n_skipFM1tNt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t6Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(
         &entry0_0, 0, 0, 0, &v_2, &v_3, &ht_0), _fx_cleanup);
   FX_CALL(
      _fx_M13K_copy_n_skipFM8add_listv2Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_tLT2R9Ast__id_tT2iN14K_form__kexp_t(ht_0,
         all_copied_0, 0), _fx_cleanup);
   FX_CALL(_fx_M3AstFM16empty_id_hashsetNt10Hashset__t1RM4id_t1i(1, &all_copied_set_0, 0), _fx_cleanup);
   _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t lst_3 = all_copied_0;
   for (; lst_3; lst_3 = lst_3->tl) {
      _fx_T2R9Ast__id_tT2iN14K_form__kexp_t* __pat___1 = &lst_3->hd;
      _fx_R9Ast__id_t n_2 = __pat___1->t0;
      FX_CALL(_fx_M13K_copy_n_skipFM3addv2Nt10Hashset__t1R9Ast__id_tR9Ast__id_t(all_copied_set_0, &n_2, 0), _fx_catch_7);

   _fx_catch_7: ;
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_CALL(_fx_M3AstFM16empty_id_hashsetNt10Hashset__t1RM4id_t1i(1, &idset0_0, 0), _fx_cleanup);
   int_ size_1 = 8;
   while (size_1 < 1024) {
      size_1 = size_1 * 2;
   }
   int_ idxsize_1 = size_1 * 2;
   _fx_make_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(0ULL, &_fx_g9Ast__noid, idset0_0, &entry0_1);
   FX_CALL(_fx_M7HashmapFM9makeindexA1i1i(idxsize_1, &v_4, 0), _fx_cleanup);
   _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* dstptr_2 = 0;
   int_ n_3 = size_1;
   {
      const int_ shape_2[] = { n_3 };
      FX_CALL(
         fx_make_arr(1, shape_2, sizeof(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t),
            (fx_free_t)_fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t,
            (fx_copy_t)_fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, 0, &v_5), _fx_cleanup);
   }
   dstptr_2 = (_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t*)v_5.data;
   for (int_ i_2 = 0; i_2 < n_3; i_2++, dstptr_2++) {
      _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&entry0_1, dstptr_2);
   }
   FX_CALL(
      _fx_M13K_copy_n_skipFM1tNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
         &entry0_1, 0, 0, 0, &v_4, &v_5, &all_deps_arg_0), _fx_cleanup);
   FX_CALL(_fx_make_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(all_deps_arg_0, &all_deps_ref_0), _fx_cleanup);
   _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* all_deps_0 = &all_deps_ref_0->data;
   _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t lst_4 = all_copied_0;
   for (; lst_4; lst_4 = lst_4->tl) {
      _fx_N14K_form__kexp_t e_1 = 0;
      _fx_LN14K_form__kexp_t v_24 = 0;
      _fx_Nt10Hashset__t1R9Ast__id_t deps_0 = 0;
      _fx_T2R9Ast__id_tT2iN14K_form__kexp_t* __pat___2 = &lst_4->hd;
      _fx_R9Ast__id_t n_4 = __pat___2->t0;
      FX_COPY_PTR(__pat___2->t1.t1, &e_1);
      FX_CALL(_fx_cons_LN14K_form__kexp_t(e_1, 0, true, &v_24), _fx_catch_8);
      FX_CALL(_fx_M6K_formFM7used_byNt10Hashset__t1R9Ast__id_t2LN14K_form__kexp_ti(v_24, 16, &deps_0, 0), _fx_catch_8);
      FX_CALL(
         _fx_M13K_copy_n_skipFM9intersectv2Nt10Hashset__t1R9Ast__id_tNt10Hashset__t1R9Ast__id_t(deps_0, all_copied_set_0, 0),
         _fx_catch_8);
      FX_CALL(
         _fx_M13K_copy_n_skipFM3addv3Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tR9Ast__id_tNt10Hashset__t1R9Ast__id_t(
            *all_deps_0, &n_4, deps_0, 0), _fx_catch_8);

   _fx_catch_8: ;
      if (deps_0) {
         _fx_free_Nt10Hashset__t1R9Ast__id_t(&deps_0);
      }
      if (v_24) {
         _fx_free_LN14K_form__kexp_t(&v_24);
      }
      if (e_1) {
         _fx_free_N14K_form__kexp_t(&e_1);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_LR9Ast__id_t lstend_0 = 0;
   _fx_LT2R9Ast__id_tT2iN14K_form__kexp_t lst_5 = all_copied_0;
   for (; lst_5; lst_5 = lst_5->tl) {
      _fx_T2R9Ast__id_tT2iN14K_form__kexp_t* __pat___3 = &lst_5->hd;
      _fx_LR9Ast__id_t node_0 = 0;
      FX_CALL(_fx_cons_LR9Ast__id_t(&__pat___3->t0, 0, false, &node_0), _fx_catch_9);
      FX_LIST_APPEND(v_6, lstend_0, node_0);

   _fx_catch_9: ;
      FX_CHECK_EXN(_fx_cleanup);
   }
   int_ res_0;
   FX_CALL(
      _fx_M3AstFM17calc_sets_closurei3iLRM4id_tNt10Hashmap__t2RM4id_tNt10Hashset__t1RM4id_t(10, v_6, *all_deps_0, &res_0, 0),
      _fx_cleanup);
   _fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t lstend_1 = 0;
   _fx_LR17K_form__kmodule_t lst_6 = kmods_0;
   for (; lst_6; lst_6 = lst_6->tl) {
      _fx_LN14K_form__kexp_t km_top_1 = 0;
      _fx_Nt10Hashset__t1R9Ast__id_t u_ids_0 = 0;
      _fx_Nt10Hashset__t1R9Ast__id_t all_u_ids_0 = 0;
      _fx_FPv1R9Ast__id_t __lambda___0 = {0};
      _fx_rLT2iN14K_form__kexp_t copied_code_ref_0 = 0;
      _fx_FPv1R9Ast__id_t __lambda___1 = {0};
      _fx_FPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_t __lambda___2 = {0};
      _fx_LT2iN14K_form__kexp_t v_25 = 0;
      _fx_LN14K_form__kexp_t copied_code_0 = 0;
      _fx_LT2iN14K_form__kexp_t copied_code_1 = 0;
      _fx_N14K_form__atom_t v_26 = {0};
      _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t empty_subst0_0 = 0;
      _fx_N14K_form__kexp_t v_27 = 0;
      _fx_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t v_28 = {0};
      _fx_N14K_form__kexp_t copied_code_2 = 0;
      _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t subst_map_0 = 0;
      _fx_LN14K_form__kexp_t copied_code_3 = 0;
      _fx_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t tup_0 = {0};
      _fx_R17K_form__kmodule_t* km_1 = &lst_6->hd;
      int_ km_toposort_idx_0 = km_1->km_toposort_idx;
      int_ km_idx_1 = km_1->km_idx;
      FX_COPY_PTR(km_1->km_top, &km_top_1);
      FX_CALL(_fx_M6K_formFM7used_byNt10Hashset__t1R9Ast__id_t2LN14K_form__kexp_ti(km_top_1, 16, &u_ids_0, 0), _fx_catch_13);
      FX_CALL(
         _fx_M13K_copy_n_skipFM9intersectv2Nt10Hashset__t1R9Ast__id_tNt10Hashset__t1R9Ast__id_t(u_ids_0, all_copied_set_0, 0),
         _fx_catch_13);
      FX_CALL(_fx_M3AstFM16empty_id_hashsetNt10Hashset__t1RM4id_t1i(1, &all_u_ids_0, 0), _fx_catch_13);
      _fx_M13K_copy_n_skipFM7make_fpFPv1R9Ast__id_t4rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tNt10Hashset__t1R9Ast__id_tiA1i(
         all_deps_ref_0, all_u_ids_0, km_toposort_idx_0, &toposort_idx_0, &__lambda___0);
      FX_CALL(_fx_M13K_copy_n_skipFM3appv2Nt10Hashset__t1R9Ast__id_tFPv1R9Ast__id_t(u_ids_0, &__lambda___0, 0), _fx_catch_13);
      FX_CALL(_fx_make_rLT2iN14K_form__kexp_t(0, &copied_code_ref_0), _fx_catch_13);
      _fx_LT2iN14K_form__kexp_t* copied_code_4 = &copied_code_ref_0->data;
      _fx_M13K_copy_n_skipFM7make_fpFPv1R9Ast__id_t2rLT2iN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t(
         copied_code_ref_0, ht_0, &__lambda___1);
      FX_CALL(_fx_M13K_copy_n_skipFM3appv2Nt10Hashset__t1R9Ast__id_tFPv1R9Ast__id_t(all_u_ids_0, &__lambda___1, 0),
         _fx_catch_13);
      _fx_FPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_t __lambda___fp_0 =
         { _fx_M13K_copy_n_skipFM10__lambda__B2T2iN14K_form__kexp_tT2iN14K_form__kexp_t, 0 };
      FX_COPY_FP(&__lambda___fp_0, &__lambda___2);
      FX_CALL(
         _fx_M13K_copy_n_skipFM4sortLT2iN14K_form__kexp_t2LT2iN14K_form__kexp_tFPB2T2iN14K_form__kexp_tT2iN14K_form__kexp_t(
            *copied_code_4, &__lambda___2, &v_25, 0), _fx_catch_13);
      _fx_free_LT2iN14K_form__kexp_t(copied_code_4);
      FX_COPY_PTR(v_25, copied_code_4);
      _fx_LN14K_form__kexp_t lstend_2 = 0;
      FX_COPY_PTR(*copied_code_4, &copied_code_1);
      _fx_LT2iN14K_form__kexp_t lst_7 = copied_code_1;
      for (; lst_7; lst_7 = lst_7->tl) {
         _fx_T2iN14K_form__kexp_t* __pat___4 = &lst_7->hd;
         _fx_LN14K_form__kexp_t node_1 = 0;
         FX_CALL(_fx_cons_LN14K_form__kexp_t(__pat___4->t1, 0, false, &node_1), _fx_catch_10);
         FX_LIST_APPEND(copied_code_0, lstend_2, node_1);

      _fx_catch_10: ;
         FX_CHECK_EXN(_fx_catch_13);
      }
      _fx_M6K_formFM6AtomIdN14K_form__atom_t1R9Ast__id_t(&_fx_g9Ast__noid, &v_26);
      FX_CALL(
         _fx_M13K_copy_n_skipFM5emptyNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t3iR9Ast__id_tN14K_form__atom_t(1,
            &_fx_g9Ast__noid, &v_26, &empty_subst0_0, 0), _fx_catch_13);
      FX_CALL(
         _fx_M6K_formFM9code2kexpN14K_form__kexp_t2LN14K_form__kexp_tR10Ast__loc_t(copied_code_0, &_fx_g10Ast__noloc, &v_27, 0),
         _fx_catch_13);
      FX_CALL(
         _fx_M8K_inlineFM11subst_namesT2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t4iN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_tB(
            km_idx_1, v_27, empty_subst0_0, true, &v_28, 0), _fx_catch_13);
      FX_COPY_PTR(v_28.t0, &copied_code_2);
      FX_COPY_PTR(v_28.t1, &subst_map_0);
      FX_CALL(_fx_M6K_formFM9kexp2codeLN14K_form__kexp_t1N14K_form__kexp_t(copied_code_2, &copied_code_3, 0), _fx_catch_13);
      _fx_LN14K_form__kexp_t lst_8 = copied_code_3;
      for (; lst_8; lst_8 = lst_8->tl) {
         _fx_N14K_form__kexp_t e_2 = lst_8->hd;
         if (FX_REC_VARIANT_TAG(e_2) == 31) {
            _fx_R17K_form__kdefval_t kv_1 = {0};
            _fx_R16Ast__val_flags_t kv_flags_0 = {0};
            _fx_R16Ast__val_flags_t new_kv_flags_0 = {0};
            _fx_R17K_form__kdefval_t v_29 = {0};
            _fx_N15K_form__kinfo_t v_30 = {0};
            _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* vcase_1 = &e_2->u.KDefVal;
            _fx_R9Ast__id_t* n_5 = &vcase_1->t0;
            FX_CALL(_fx_M6K_formFM8get_kvalRM9kdefval_t2R9Ast__id_tR10Ast__loc_t(n_5, &vcase_1->t2, &kv_1, 0), _fx_catch_11);
            _fx_copy_R16Ast__val_flags_t(&kv_1.kv_flags, &kv_flags_0);
            _fx_make_R16Ast__val_flags_t(kv_flags_0.val_flag_arg, kv_flags_0.val_flag_mutable, kv_flags_0.val_flag_temp,
               kv_flags_0.val_flag_tempref, true, kv_flags_0.val_flag_subarray, kv_flags_0.val_flag_instance,
               &kv_flags_0.val_flag_method, kv_flags_0.val_flag_ctor, 0, &new_kv_flags_0);
            _fx_make_R17K_form__kdefval_t(&kv_1.kv_name, &kv_1.kv_cname, kv_1.kv_typ, &new_kv_flags_0, &kv_1.kv_loc, &v_29);
            _fx_M6K_formFM4KValN15K_form__kinfo_t1RM9kdefval_t(&v_29, &v_30);
            FX_CALL(_fx_M6K_formFM13set_idk_entryv2R9Ast__id_tN15K_form__kinfo_t(n_5, &v_30, 0), _fx_catch_11);

         _fx_catch_11: ;
            _fx_free_N15K_form__kinfo_t(&v_30);
            _fx_free_R17K_form__kdefval_t(&v_29);
            _fx_free_R16Ast__val_flags_t(&new_kv_flags_0);
            _fx_free_R16Ast__val_flags_t(&kv_flags_0);
            _fx_free_R17K_form__kdefval_t(&kv_1);
         }
         FX_CHECK_EXN(_fx_catch_12);

      _fx_catch_12: ;
         FX_CHECK_EXN(_fx_catch_13);
      }
      _fx_make_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(copied_code_3, subst_map_0, &tup_0);
      _fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t node_2 = 0;
      FX_CALL(_fx_cons_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(&tup_0, 0, false, &node_2),
         _fx_catch_13);
      FX_LIST_APPEND(all_copied_code_0, lstend_1, node_2);

   _fx_catch_13: ;
      _fx_free_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(&tup_0);
      if (copied_code_3) {
         _fx_free_LN14K_form__kexp_t(&copied_code_3);
      }
      if (subst_map_0) {
         _fx_free_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(&subst_map_0);
      }
      if (copied_code_2) {
         _fx_free_N14K_form__kexp_t(&copied_code_2);
      }
      _fx_free_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(&v_28);
      if (v_27) {
         _fx_free_N14K_form__kexp_t(&v_27);
      }
      if (empty_subst0_0) {
         _fx_free_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(&empty_subst0_0);
      }
      _fx_free_N14K_form__atom_t(&v_26);
      if (copied_code_1) {
         _fx_free_LT2iN14K_form__kexp_t(&copied_code_1);
      }
      if (copied_code_0) {
         _fx_free_LN14K_form__kexp_t(&copied_code_0);
      }
      if (v_25) {
         _fx_free_LT2iN14K_form__kexp_t(&v_25);
      }
      FX_FREE_FP(&__lambda___2);
      FX_FREE_FP(&__lambda___1);
      if (copied_code_ref_0) {
         _fx_free_rLT2iN14K_form__kexp_t(&copied_code_ref_0);
      }
      FX_FREE_FP(&__lambda___0);
      if (all_u_ids_0) {
         _fx_free_Nt10Hashset__t1R9Ast__id_t(&all_u_ids_0);
      }
      if (u_ids_0) {
         _fx_free_Nt10Hashset__t1R9Ast__id_t(&u_ids_0);
      }
      if (km_top_1) {
         _fx_free_LN14K_form__kexp_t(&km_top_1);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_LR17K_form__kmodule_t lstend_3 = 0;
   _fx_LR17K_form__kmodule_t lst_9 = kmods_0;
   _fx_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t lst_10 = all_copied_code_0;
   for (; lst_9 && lst_10; lst_10 = lst_10->tl, lst_9 = lst_9->tl) {
      _fx_LN14K_form__kexp_t copied_code_5 = 0;
      _fx_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t subst_map_1 = 0;
      _fx_LN14K_form__kexp_t km_top_2 = 0;
      _fx_N14K_form__kexp_t v_31 = 0;
      _fx_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t v_32 = {0};
      _fx_N14K_form__kexp_t new_top_0 = 0;
      _fx_LN14K_form__kexp_t new_top_1 = 0;
      _fx_LN14K_form__kexp_t v_33 = 0;
      _fx_R17K_form__kmodule_t rec_0 = {0};
      _fx_T2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t* __pat___5 = &lst_10->hd;
      _fx_R17K_form__kmodule_t* km_2 = &lst_9->hd;
      FX_COPY_PTR(__pat___5->t0, &copied_code_5);
      FX_COPY_PTR(__pat___5->t1, &subst_map_1);
      int_ km_idx_2 = km_2->km_idx;
      FX_COPY_PTR(km_2->km_top, &km_top_2);
      FX_CALL(_fx_M6K_formFM9code2kexpN14K_form__kexp_t2LN14K_form__kexp_tR10Ast__loc_t(km_top_2, &_fx_g10Ast__noloc, &v_31, 0),
         _fx_catch_14);
      FX_CALL(
         _fx_M8K_inlineFM11subst_namesT2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t4iN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_tB(
            km_idx_2, v_31, subst_map_1, false, &v_32, 0), _fx_catch_14);
      FX_COPY_PTR(v_32.t0, &new_top_0);
      FX_CALL(_fx_M6K_formFM9kexp2codeLN14K_form__kexp_t1N14K_form__kexp_t(new_top_0, &new_top_1, 0), _fx_catch_14);
      FX_CALL(
         _fx_M13K_copy_n_skipFM7__add__LN14K_form__kexp_t2LN14K_form__kexp_tLN14K_form__kexp_t(copied_code_5, new_top_1, &v_33,
            0), _fx_catch_14);
      _fx_make_R17K_form__kmodule_t(&km_2->km_name, km_2->km_idx, km_2->km_toposort_idx, &km_2->km_cname, v_33, km_2->km_deps,
         km_2->km_skip, km_2->km_main, &km_2->km_pragmas, &rec_0);
      _fx_LR17K_form__kmodule_t node_3 = 0;
      FX_CALL(_fx_cons_LR17K_form__kmodule_t(&rec_0, 0, false, &node_3), _fx_catch_14);
      FX_LIST_APPEND(*fx_result, lstend_3, node_3);

   _fx_catch_14: ;
      _fx_free_R17K_form__kmodule_t(&rec_0);
      if (v_33) {
         _fx_free_LN14K_form__kexp_t(&v_33);
      }
      if (new_top_1) {
         _fx_free_LN14K_form__kexp_t(&new_top_1);
      }
      if (new_top_0) {
         _fx_free_N14K_form__kexp_t(&new_top_0);
      }
      _fx_free_T2N14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(&v_32);
      if (v_31) {
         _fx_free_N14K_form__kexp_t(&v_31);
      }
      if (km_top_2) {
         _fx_free_LN14K_form__kexp_t(&km_top_2);
      }
      if (subst_map_1) {
         _fx_free_Nt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(&subst_map_1);
      }
      if (copied_code_5) {
         _fx_free_LN14K_form__kexp_t(&copied_code_5);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   int s_0 = !lst_9 + !lst_10;
   FX_CHECK_EQ_SIZE(s_0 == 0 || s_0 == 2, _fx_cleanup);

_fx_cleanup: ;
   FX_FREE_ARR(&toposort_idx_0);
   if (all_copied_0) {
      _fx_free_LT2R9Ast__id_tT2iN14K_form__kexp_t(&all_copied_0);
   }
   if (v_0) {
      _fx_free_N14K_form__kexp_t(&v_0);
   }
   _fx_free_T2iN14K_form__kexp_t(&v_1);
   _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t(&entry0_0);
   FX_FREE_ARR(&v_2);
   FX_FREE_ARR(&v_3);
   if (ht_0) {
      _fx_free_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t(&ht_0);
   }
   if (all_copied_set_0) {
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&all_copied_set_0);
   }
   if (idset0_0) {
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&idset0_0);
   }
   _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&entry0_1);
   FX_FREE_ARR(&v_4);
   FX_FREE_ARR(&v_5);
   if (all_deps_arg_0) {
      _fx_free_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&all_deps_arg_0);
   }
   if (all_deps_ref_0) {
      _fx_free_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&all_deps_ref_0);
   }
   FX_FREE_LIST_SIMPLE(&v_6);
   if (all_copied_code_0) {
      _fx_free_LT2LN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tN14K_form__atom_t(&all_copied_code_0);
   }
   return fx_status;
}

static int _fx_M13K_copy_n_skipFM10__lambda__v1R9Ast__id_t(struct _fx_R9Ast__id_t* n_0, void* fx_fv)
{
   _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t v_0 = {0};
   _fx_Nt10Hashset__t1R9Ast__id_t v_1 = 0;
   int fx_status = 0;
   _fx_M13K_copy_n_skipFM10__lambda__v1R9Ast__id_t_cldata_t* cv_0 =
      (_fx_M13K_copy_n_skipFM10__lambda__v1R9Ast__id_t_cldata_t*)fx_fv;
   _fx_Nt10Hashset__t1R9Ast__id_t all_u_ids_0 = cv_0->t1;
   int_* km_toposort_idx_0 = &cv_0->t2;
   fx_arr_t* toposort_idx_0 = &cv_0->t3;
   _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* all_deps_0 = &cv_0->t0->data;
   int_ v_2 = n_0->m;
   FX_CHKIDX(FX_CHKIDX1(*toposort_idx_0, 0, v_2), _fx_cleanup);
   if (*FX_PTR_1D(int_, *toposort_idx_0, v_2) < *km_toposort_idx_0) {
      uint64_t __fold_result___0 = 14695981039346656037ULL;
      uint64_t h_0 = __fold_result___0 ^ ((uint64_t)n_0->m ^ 14695981039346656037ULL);
      __fold_result___0 = h_0 * 1099511628211ULL;
      uint64_t h_1 = __fold_result___0 ^ ((uint64_t)n_0->i ^ 14695981039346656037ULL);
      __fold_result___0 = h_1 * 1099511628211ULL;
      uint64_t h_2 = __fold_result___0 ^ ((uint64_t)n_0->j ^ 14695981039346656037ULL);
      __fold_result___0 = h_2 * 1099511628211ULL;
      FX_CALL(
         _fx_M13K_copy_n_skipFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(all_u_ids_0, n_0,
            __fold_result___0 & 9223372036854775807ULL, 0), _fx_cleanup);
      _fx_Ta2i v_3;
      FX_CALL(
         _fx_M13K_copy_n_skipFM9find_idx_Ta2i2Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tR9Ast__id_t(*all_deps_0, n_0,
            &v_3, 0), _fx_cleanup);
      int_ j_0 = v_3.t1;
      if (j_0 >= 0) {
         FX_CHKIDX(FX_CHKIDX1((*all_deps_0)->u.t.t5, 0, j_0), _fx_cleanup);
         FX_COPY_PTR(
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, (*all_deps_0)->u.t.t5, j_0)->data,
            &v_1);
         _fx_M13K_copy_n_skipFM4SomeNt6option1Nt10Hashset__t1R9Ast__id_t1Nt10Hashset__t1R9Ast__id_t(v_1, &v_0);
      }
      else {
         _fx_copy_Nt6option1Nt10Hashset__t1R9Ast__id_t(&_fx_g21K_copy_n_skip__None1_, &v_0);
      }
      if (v_0.tag == 2) {
         fx_arr_t table_0 = {0};
         _fx_Nt10Hashset__t1R9Ast__id_t deps_0 = v_0.u.Some;
         fx_copy_arr(&deps_0->u.t.t5, &table_0);
         int_ v_4 = deps_0->u.t.t2;
         for (int_ j_1 = 0; j_1 < v_4; j_1++) {
            FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_1), _fx_catch_0);
            if (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_1)->hv < 9223372036854775808ULL) {
               FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_1), _fx_catch_0);
               _fx_R9Ast__id_t v_5 = FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_1)->key;
               int_ v_6 = v_5.m;
               FX_CHKIDX(FX_CHKIDX1(*toposort_idx_0, 0, v_6), _fx_catch_0);
               if (*FX_PTR_1D(int_, *toposort_idx_0, v_6) < *km_toposort_idx_0) {
                  uint64_t __fold_result___1 = 14695981039346656037ULL;
                  uint64_t h_3 = __fold_result___1 ^ ((uint64_t)v_5.m ^ 14695981039346656037ULL);
                  __fold_result___1 = h_3 * 1099511628211ULL;
                  uint64_t h_4 = __fold_result___1 ^ ((uint64_t)v_5.i ^ 14695981039346656037ULL);
                  __fold_result___1 = h_4 * 1099511628211ULL;
                  uint64_t h_5 = __fold_result___1 ^ ((uint64_t)v_5.j ^ 14695981039346656037ULL);
                  __fold_result___1 = h_5 * 1099511628211ULL;
                  FX_CALL(
                     _fx_M13K_copy_n_skipFM4add_v3Nt10Hashset__t1R9Ast__id_tR9Ast__id_tq(all_u_ids_0, &v_5,
                        __fold_result___1 & 9223372036854775807ULL, 0), _fx_catch_0);
               }
            }

         _fx_catch_0: ;
            FX_CHECK_EXN(_fx_catch_1);
         }

      _fx_catch_1: ;
         FX_FREE_ARR(&table_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   _fx_free_Nt6option1Nt10Hashset__t1R9Ast__id_t(&v_0);
   if (v_1) {
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&v_1);
   }
   return fx_status;
}

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM7make_fpFPv1R9Ast__id_t4rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tNt10Hashset__t1R9Ast__id_tiA1i(
   struct _fx_rNt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* arg0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* arg1,
   int_ arg2,
   fx_arr_t* arg3,
   struct _fx_FPv1R9Ast__id_t* fx_result)
{
   FX_MAKE_FP_IMPL_START(_fx_M13K_copy_n_skipFM10__lambda__v1R9Ast__id_t_cldata_t,
      _fx_free_M13K_copy_n_skipFM10__lambda__v1R9Ast__id_t, _fx_M13K_copy_n_skipFM10__lambda__v1R9Ast__id_t);
   FX_COPY_PTR(arg0, &fcv->t0);
   FX_COPY_PTR(arg1, &fcv->t1);
   fcv->t2 = arg2;
   fx_copy_arr(arg3, &fcv->t3);
   return 0;
}

static int _fx_M13K_copy_n_skipFM12__lambda__1_v1R9Ast__id_t(struct _fx_R9Ast__id_t* n_0, void* fx_fv)
{
   _fx_Nt6option1T2iN14K_form__kexp_t v_0 = {0};
   _fx_T2iN14K_form__kexp_t v_1 = {0};
   int fx_status = 0;
   _fx_M13K_copy_n_skipFM12__lambda__1_v1R9Ast__id_t_cldata_t* cv_0 =
      (_fx_M13K_copy_n_skipFM12__lambda__1_v1R9Ast__id_t_cldata_t*)fx_fv;
   _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t ht_0 = cv_0->t1;
   _fx_LT2iN14K_form__kexp_t* copied_code_0 = &cv_0->t0->data;
   _fx_Ta2i v_2;
   FX_CALL(_fx_M13K_copy_n_skipFM9find_idx_Ta2i2Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_tR9Ast__id_t(ht_0, n_0, &v_2, 0),
      _fx_cleanup);
   int_ j_0 = v_2.t1;
   if (j_0 >= 0) {
      FX_CHKIDX(FX_CHKIDX1(ht_0->u.t.t5, 0, j_0), _fx_cleanup);
      _fx_copy_T2iN14K_form__kexp_t(
         &FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tT2iN14K_form__kexp_t, ht_0->u.t.t5, j_0)->data, &v_1);
      _fx_M13K_copy_n_skipFM4SomeNt6option1T2iN14K_form__kexp_t1T2iN14K_form__kexp_t(&v_1, &v_0);
   }
   else {
      _fx_copy_Nt6option1T2iN14K_form__kexp_t(&_fx_g19K_copy_n_skip__None, &v_0);
   }
   if (v_0.tag == 2) {
      _fx_T2iN14K_form__kexp_t v_3 = {0};
      _fx_LT2iN14K_form__kexp_t v_4 = 0;
      _fx_T2iN14K_form__kexp_t* v_5 = &v_0.u.Some;
      _fx_make_T2iN14K_form__kexp_t(v_5->t0, v_5->t1, &v_3);
      FX_CALL(_fx_cons_LT2iN14K_form__kexp_t(&v_3, *copied_code_0, true, &v_4), _fx_catch_0);
      _fx_free_LT2iN14K_form__kexp_t(copied_code_0);
      FX_COPY_PTR(v_4, copied_code_0);

   _fx_catch_0: ;
      if (v_4) {
         _fx_free_LT2iN14K_form__kexp_t(&v_4);
      }
      _fx_free_T2iN14K_form__kexp_t(&v_3);
   }

_fx_cleanup: ;
   _fx_free_Nt6option1T2iN14K_form__kexp_t(&v_0);
   _fx_free_T2iN14K_form__kexp_t(&v_1);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M13K_copy_n_skipFM7make_fpFPv1R9Ast__id_t2rLT2iN14K_form__kexp_tNt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t(
   struct _fx_rLT2iN14K_form__kexp_t_data_t* arg0,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tT2iN14K_form__kexp_t_data_t* arg1,
   struct _fx_FPv1R9Ast__id_t* fx_result)
{
   FX_MAKE_FP_IMPL_START(_fx_M13K_copy_n_skipFM12__lambda__1_v1R9Ast__id_t_cldata_t,
      _fx_free_M13K_copy_n_skipFM12__lambda__1_v1R9Ast__id_t, _fx_M13K_copy_n_skipFM12__lambda__1_v1R9Ast__id_t);
   FX_COPY_PTR(arg0, &fcv->t0);
   FX_COPY_PTR(arg1, &fcv->t1);
   return 0;
}

static int _fx_M13K_copy_n_skipFM10__lambda__B2T2iN14K_form__kexp_tT2iN14K_form__kexp_t(
   struct _fx_T2iN14K_form__kexp_t* arg0_0,
   struct _fx_T2iN14K_form__kexp_t* arg1_0,
   bool* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int_ idx1_0 = arg0_0->t0;
   int_ idx2_0 = arg1_0->t0;
   *fx_result = idx1_0 < idx2_0;
   return fx_status;
}

FX_EXTERN_C int fx_init_K_copy_n_skip(void)
{
   int fx_status = 0;
   return fx_status;
}

FX_EXTERN_C void fx_deinit_K_copy_n_skip(void)
{

}

